+ 1

Why "=" "!=" "=="

somebody explain please!!!

22nd Feb 2017, 5:41 AM
Vishwajeet Sharma
Vishwajeet Sharma - avatar
5 Réponses
+ 2
And != checks if the values are different.
22nd Feb 2017, 5:45 AM
SapuSeven
SapuSeven - avatar
+ 1
= is for assignment — "set a variable to this value" == is to test — "is the value of this variable this?"
22nd Feb 2017, 5:43 AM
मानस
+ 1
They could be arbitrarily assigned to any symbol(s). These happened to be most consistent.
22nd Feb 2017, 5:54 AM
मानस
+ 1
= to assign value, like you want to assign value to any variable. as var x=5. == is to check if both values are equal , 5==5 will return true. != is not equal. 5!=6 will return true.
22nd Feb 2017, 6:12 AM
Raj Kumar Chauhan
Raj Kumar Chauhan - avatar
0
Why? to explain why you would need a university course of compiler design, automata and formal languages. just take them as they are
22nd Feb 2017, 5:51 AM
Seckar
Seckar - avatar