0
what's the difference btw = and ==?
3 odpowiedzi
+ 3
'=' operator is for assigning values
a=2; // a now has a value equal to 2
"==" operator is for checking equality
a==2; // checking if a has a value equal to 2
"==" is a condition and cannot be used independently anywhere. It must have a function assoiciated with it
+ 1
thank you.
+ 1
or in simple = is called equal and == is called test for equality.