Someone explain this to me


#1

var isEven = function(number) {



var cal = number % 2;

if ( cal === 0) {
return true;
}
else {
return false;
}
};

isEven(4);
var(number = i)
if (i <= 100); {
    return "another string"
}
else {
    return "yet another string"
}

#2

The first part is a function that determines if a number is even or not and the second part is ... i don't actually know what this should be but whatever it is it has some bug in it:

var(number = i)

no () needed, [missing semicolon], and what is i? Never used before probably undeclared and undefined.

if (i <= 100); {

No semicolons after conditions, here is an explanation why: