Codington
0 of 10 problems solved • 0%

Exercise prompt

Use a Comparison in if

The condition inside if can be a comparison. JavaScript evaluates it before deciding whether to run the block.

Example

const temperature = 22; if (temperature >= 20) { console.log("Warm"); } // Output: // Warm

The comparison is true, so the message appears.

Your task

Complete the condition so a score of at least 7 displays Passed.