Comparison Operators

noun

say it: “kum-PAIR-ih-sun OP-er-ay-terz” /kəmˈpærɪsən ˈɒpəreɪtərz/

Symbols that compare two values and answer true or false: > greater than, < less than, >= at least, <= at most, === equal and !== not equal.

What is Comparison Operators in JavaScript?

Comparison Operators — Symbols like == and < that compare two values and answer True or False.

const enteredCode = "42";
const expectedCode = 42;
const matches = enteredCode === expectedCode;

In a sentence

  • “I used comparison operators to check that age >= 18 before showing the rental form.”

Level: Novice · More JavaScript terms at this level

Updated

In other subjects