Where's a bug?


#1

Can't figure out what's wrong. It says "unexpected token else"

var quarter = 60;
if (quarter % 3 === 0 ) {

console.log("The statement is true");
};
else {
console.log("The statement is false");
};
quarter();


#2

var quarter = 60;
if (quarter % 3 === 0 ) {
    console.log("The statement is true");
} else {
    console.log("The statement is false");
};
quarter();

You had problem before else, you put ; after } so else wasn't expected. Fixed it for you.


#3

Thank you ! Always confuse where semicolon supposed to be and where not. Cheers !