if Statements

if Statements

What does an if statement do in JavaScript?

What will be printed when this code runs?

let score = 10;
if (score > 5) {
     console.log("You win!");
}

Which of these is the correct way to write an if statement?

Leave Your Comment