Message

Error type

What went wrong?

There is an error with how an if condition is written. In any programming language, code needs to make decisions and carry out actions accordingly depending on different inputs. The if statement executes a statement if a specified condition is truthy. In JavaScript, this condition must appear in parenthesis after the if keyword, like this:

if (condition) {
// do something if the condition is true
}

Examples

It might just be an oversight, carefully check all you parenthesis in your code.