Why is JS so hard?


#1

Do not get these syntaxes!!?

Code:

var quarter = function(9);

if (quarter(9) % 3 === 0 ) {
return("");
} else {
return("");
}


#2

Change this to

var quarter = function(number){ //Defining 'quarter'.
return number/4;
}

if (quarter(12) % 3 === 0 ) { //calling quarter on a number, then checking if it is divisible by 3.
console.log("The statement is true");
} else {
console.log("The statement is false");
}