You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Greater/less than or equals: <code>a >= b</code>, <code>a <= b</code>.
7
-
- Equals: `a == b` (please note the double equals sign `=`. A single symbol `a = b` would mean an assignment).
8
-
- Not equals. In maths the notation is <code>≠</code>, but in JavaScript it's written as an assignment with an exclamation sign before it: <code>a != b</code>.
9
+
- Equals: `a == b`, please note the double equality sign `=` means the equality test, while a single one `a = b` means an assignment.
10
+
- Not equals. In maths the notation is <code>≠</code>, but in JavaScript the it's written as <code>a != b</code>.
11
+
12
+
In this article we'll learn more about different types of comparisons, how JavaScript makes them, including important peculiarities.
9
13
10
14
## Boolean is the result
11
15
12
-
Like all other operators, a comparison returns a value. In this case, the value is a boolean.
16
+
All comparison operators return a boolean value:
13
17
14
18
-`true` -- means "yes", "correct" or "the truth".
15
19
-`false` -- means "no", "wrong" or "not the truth".
0 commit comments