0

What does '==' do?

25th Apr 2018, 12:56 PM
Swaraj Khadka
Swaraj Khadka - avatar
5 ответов
+ 1
Well in real world, we compare LHS and RHS with an equal (=) sign. In programming languages, to compare what's on left and right, double equals to (==) sign is used. Example: if (2==3) result: false While single equal sign is an assignment operator, which assigns the right side value into variable on the left side. Example: b = 11 a = b now the value of a is b, that is 11.
25th Apr 2018, 12:59 PM
Kawalpreet Juneja
Kawalpreet Juneja - avatar
+ 1
It checks if the two values are the same.
25th Apr 2018, 6:08 PM
Paul Grasser
Paul Grasser - avatar
+ 1
thank you
25th Apr 2018, 11:10 PM
Swaraj Khadka
Swaraj Khadka - avatar
0
thanks alot
25th Apr 2018, 1:06 PM
Swaraj Khadka
Swaraj Khadka - avatar