Skip to content

Instantly share code, notes, and snippets.

View arrbxr's full-sized avatar
🎯
Focusing

Abhishek Raj Ravi arrbxr

🎯
Focusing
  • Aryabhatta Knowledge University, Bihar
  • Patna India
  • X @arrbxr
View GitHub Profile
import java.util.*;
class Main {
public static void main(String[] args) {
int a,b,c;
Scanner sc = new Scanner(System.in);
System.out.println("Enter Value");
a = sc.nextInt();
#include <iostream>
using namespace std;
void abc();
int main() {
std::cout << "Hello World!\n";
abc();
return 0;
}
void abc(){
// JavaScript Function Four Ways
// Function declaration
function square(x){
return x * x;
}
// Function Expression
const square = function(x){
@arrbxr
arrbxr / facebook.js
Created April 26, 2018 17:39
facebook created by arrbxr - https://repl.it/@arrbxr/facebook
var facebookProfile = {
name : "Abhishek Raj RAvi",
friends : 50,
messages : ["Hello", "how are you", "i'm fine"],
postMessage : function (message){
this.messages.push(message);
return this.messages;
},
@arrbxr
arrbxr / Counting Cards.js
Created April 26, 2018 20:25
Counting Cards created by arrbxr - https://repl.it/@arrbxr/Counting-Cards
var count = 0;
function cc(card) {
switch(card){
case 1:
case 2:
case 3:
case 4:
@arrbxr
arrbxr / Counting Cards.js
Created April 26, 2018 20:25
Counting Cards created by arrbxr - https://repl.it/@arrbxr/Counting-Cards
var count = 0;
function cc(card) {
switch(card){
case 1:
case 2:
case 3:
case 4:
function randomWholeNum() {
// here random number is 0 to 100
return Math.floor(Math.random() * 100);
}
randomWholeNum();
function randomFromRange(myMin, myMax){
return Math.floor(Math.random() * (myMax - myMin + 1)) + myMin;
}
randomFromRange(12,152);
var array = [1, 12, 21, 2];
array.sort(function(a,b){
return b - a;
});
var array = [1,2,3,4,5,6,7];
var newArray = [];
newArray = array.reverse();