This site runs best with JavaScript enabled.

A Fruitful Guide to JavaScript's Comparison Operators


Evergreen
🌳
Last tended Feb 14, 2019
JavaScript
Web Development
Illustrated Notes

One small apple being compared to a large pile of apples

Comparing values is one of those essential developer skills that helps you write conditionals, if / then statements, filters, and plenty more. Here's the apples and oranges guide to using them in JavaScript.

Javascript's comparison operators give us a way of comparing values
Equality comes in loose and strict varieties. You should always use strict equality.
Inequality follows the same loose and strict rules as equality
Relational equality let's us check which value is greater

Want more illustrated notes on web development?

Take a look at

,
JSX is a Lovechild
or
JavaScript's ...spread Operator

Want to share?

Join the newsletter

For weekly notes on visual thinking, ethical technology, and cultural anthropology.

Maggie Appleton © 2021