RSRobince Studio

JavaScript Operators

Arithmetic operators do maths: + - * / and % (remainder). Comparison operators return true or false: === (equal), !== (not equal), >, <.

console.log(7 % 3)      // 1
console.log(5 === 5)    // true
Try it yourself

Loading editor…

Always compare with === (three equals), not ==. The triple version does not do surprising type conversions.