x = 5
)
Operator | Description | Example |
---|---|---|
== |
is equal to | 5 == 8 is false |
=== |
is exactly equal to (value and type) | x === 5 is truex === "5" is false |
!= |
is not equal | x != 8 is true |
> |
is greater than | 5 > 8 is false |
< |
is less than | 5 < 8 is true |
>= |
is greater than or equal to | 5 >= 8 is false |
<= |
is less than or equal to | 5 <= 8 is true |
Logical Operators (given x=6 and y=3 )
|
|
Conditional Operator
A conditional operator assigns a value to a variable based on some condition. For the script, if the OK button is clicked, then go back to the default homepage.
Otherwise, go back to the current page.
|
|