+ 2
What is the difference between = and ==?
Please be user friendly when answering :)
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
+ 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.
+ 2
= is used for assigning
== is used for comparing
+ 1
= means we are storing something into a variable or but == is the mathematical equal checking operator.
Example- a=1 b=1 a==b
+ 1
= is an assign operator to assign. == check equal or not .
+ 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 .
0
= sign is used to declare or assign and == sign is used to compare by checking if a value is equal to another
0
former is for assigning, later is for comparing.
0
When using = u are automatically allocating the value to something definite while the == is for comparing
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. 😃