0 of 10 problems solved • 0%

Exercise prompt

Run Code with if

An if statement runs its block only when its condition is true. The block is surrounded by braces.

Example

const isMorning = true; if (isMorning) { console.log("Good morning"); } // Output: // Good morning

The message appears because the condition is true.

Your task

Write an if statement that displays Take an umbrella when isRaining is true.