Scripter Javascript Tutorial
javascriptmusiclogicscripterbookexcerpttutorial27 Comparison Operators
MDN:
Comparisons are used to test values and determine whether the
comparison is true or false. These are primarily needed for branching
(if
) statements.
== equal to
60 == 60 // true
72 == 60 // false
!= not equal
60 != 60 // false
72 != 60 // true
> greater than
60 > 72 // false
72 > 60 // true
< less than
60 < 72 // true
72 < 60 // false
>= greater than or equal to
72 >= 60 // true
60 >= 60 // true
60 >= 72 // false
<= less than or equal to
72 <= 60 // false
60 <= 60 // true
60 <= 72 // true