+ 2

what is ==

what does == mean?

19th Apr 2018, 12:25 PM
spe
spe - avatar
3 Answers
+ 9
It's an equality operator used to check if both values have the same value. Example (in Javascript) - if(2==2){ alert ("Equal") } The "==" equality operator returns true if both the values are equal else it returns false
19th Apr 2018, 12:30 PM
Nikhil
Nikhil - avatar
+ 3
= is an Assignment Operator it is used to assign the value of variable or expression, while == is an Equal to Operator and it is also a relation operator used for comparison (to compare value of both left and right side operands).
19th Apr 2018, 1:06 PM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar
0
dont forget the explicit check aswell === this will also check if the left is the same value and type as the right.
25th Apr 2018, 6:53 AM
D Coull
D Coull - avatar