I'm trying to learn JavaScript on Code Academy I am facing the following syntax problem. Tells me:
expected an identifier and instead saw 'else'. Missing ';' before statement
Here is the code:
If("Jon".length * 2 / (2+1) === 6);
{
console.log("The answer makes sense!");
}
else {
console.log("Error. Error. Error.");
}
console.logis not cross-browser. Old browsers will result in JavaScript error.