JS

JavaScript Fundamentals 3 - Syntax for an if state...

8.

What is the correct syntax for an if statement in JavaScript?

if (condition) { // code to be executed }

if {condition}; // code to be executed

if condition: // code to be executed

if (condition) // code to be executed