+ 2

What is the difference between = and ==?

Please be user friendly when answering :)

30th Jul 2016, 1:13 PM
Nadir Nour
Nadir  Nour - avatar
10 Réponses
+ 7
when using = you are saying it is equal to something when using == you are asking if it is equal to something
2nd Aug 2016, 1:53 PM
Laura
Laura - avatar
+ 4
In the notes at the bottom it says that = is assigning, so for example x=10, you have assigned x to be equal to 10. As for ==.. it's comparing, so saying something like x==4 would be false because x=10.
31st Jul 2016, 5:55 AM
Alex Tardif
Alex Tardif - avatar
+ 2
= is used for assigning == is used for comparing
30th Aug 2016, 6:32 PM
beauty1234
+ 1
= means we are storing something into a variable or but == is the mathematical equal checking operator. Example- a=1 b=1 a==b
2nd Aug 2016, 8:54 PM
Samiul Sk
Samiul Sk - avatar
+ 1
= is an assign operator to assign. == check equal or not .
3rd Aug 2016, 5:42 PM
johnny
+ 1
= is an assignment operator where as == is an equivalence operator. using = we can assign or initialise value to a variable. by using == we can check the equality between the values on either sides of the operator , either numeric or string .
15th Aug 2016, 10:32 AM
V Sri Harshavardhan
V Sri Harshavardhan - avatar
0
= sign is used to declare or assign and == sign is used to compare by checking if a value is equal to another
8th Aug 2016, 3:19 AM
Fayaz Rahman
Fayaz Rahman - avatar
0
former is for assigning, later is for comparing.
11th Aug 2016, 3:54 PM
Nikhil Pillai
Nikhil Pillai - avatar
0
When using = u are automatically allocating the value to something definite while the == is for comparing
24th Aug 2016, 9:51 PM
Emmy Wildrose
Emmy Wildrose - avatar
0
singel(=) means you have assingned a value to a variable while double(==) is used to check if sth is correct. e.g A=5 means you have assigned 5 to variable A and A==5 means you are checking if A=5 or not. I hope it helps you. 😃
17th Dec 2016, 2:29 PM
‎‏‪‏‪Tarami Nishan‬‏‬‏‎
‎‏‪‏‪Tarami Nishan‬‏‬‏‎ - avatar