0
what is difference between = and==
2 Answers
+ 1
Hi Binit,
A double equals '==' is used solely for comparisons. For example:
if (age == 18){}
For pretty much everything else, such as declaring and modifying variables, a single equals '=' will do the trick just fine.
0
for example:
x=1;
y=x;
if (x==y){}
while (x==y){}