bhylu.com

Advertisements

JS Comparisons

A comparison produces true or false. Strict equality compares values without converting their types first.

Where to run this

This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.

A practical example

JavaScript

console.log(5 === "5");
console.log(5 === 5);
console.log(8 >= 6);

What happens

The results are false, true, and true.