+ 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