-
Notifications
You must be signed in to change notification settings - Fork 8
2.8 Comparisons
Bunlong VAN edited this page Feb 16, 2018
·
3 revisions
Many comparison operators we know from maths:
-
Greater/less than:
a > b
,a < b
. -
Greater/less than or equals:
a >= b
,a <= b
. -
Equality check is written as
a == b
(please note the double equation sign =. A single symbol a = b would mean an assignment). -
Not equals. In maths the notation is ≠, in JavaScript it’s written as an assignment with an exclamation sign before it: a != b.