Operator | Comparison | Returns true if... |
---|---|---|
=== | Compares both value and datatype. | Returns true if both datatype and value are equal |
!== | Compares both value and datatype. | Returns true if both datatype and value are not equal |
> | Compares value. | Returns true if first value is greater than the second |
< | Compares value. | Returns true if first value is less than the second |
>= | Compares value. | Returns true if first value is greater than or equal to the second |
<= | Compares value. | Returns true if first value is less than or equal to the second |
|| | Compares booleans, OR statement | Returns true if this value or that value is true |
&& | Compares booleans, AND statement | Returns true if both values are true |
Instructions:
Choose different numbers and operators to test the different outcomes of operators
Also, try adding a second parameter to test the || and && operators
Instructions:
By only changing the value within the variables complete the goals set by each individual box. After completing a task, the next will unlock. The numbered boxes will show your progress. Press the reset button to reset the activity.
Once you complete all five a secret might appear :)
1
2
3
4
5
Goal: Make the div background color Green
Goal: Make the border color yellow
Goal: Make the text size 5
Goal: Make the text blue
Goal: Make the width of the div 3000px