Hello expert,
Working on a Javascript tutoriaa at Codeacademy.
Input
If
("Jon".length * 2 / (2+1) === 2);
{
console.log("The answer makes sense!")
}
else
{
console.log("Error error error");
}
Open in new window
The screen is saying there is a syntax
error at the line that has the 'else' keyword:
' Expected identifier and
instead saw 'else'. Missing semicolon.
But there is a semicolon after the console.log
statement. Any idea why it says it is looking for an identifier?
Thanks.
Allen in Dallas
I don't see why you MUST reformat, change position of the bracket...
The following is valid:
Open in new window