+ 3
What is the difference between i=1 and i==1 and What does i+=1 means
You guys just give me what you have on your mind if you don't mind and if I am not taking your Golden Time.
3 Respostas
+ 4
i=1 assigns 1 to variable i.
i==1 compares i with 1. It doesn't mutate/change the value of i. It just evaluates true or false depending on whether i is equal to 1.
i+=1 adds 1 to the old value of i.
+ 2
First = is Assignment operator.
Second == Comparison operator
Third += increment operator.
+ 1
Tnx