+ 1

Short answer needed

Can somebody explain to me what "++", "--", "==, means? In simple language cuz I'm rookie.. thanks

17th May 2019, 10:16 PM
Miralem Asceric
Miralem Asceric - avatar
4 Respostas
+ 5
++ increment i++ --> i = i + 1 -- decrement i-- --> i = i - 1 == boolean operator (equal) 2 == 4 --> false 2 == 2 --> true
17th May 2019, 10:25 PM
Denise Roßberg
Denise Roßberg - avatar
+ 4
"i++" - post-increment, "i--" - post-decrement: "returns the original value before changing the variable." "++i" - pre-increment, "--i" - pre-decrement: "first changes the variable, and then returns the value".
17th May 2019, 11:55 PM
Solo
Solo - avatar
+ 1
i=5; i++; print(i); //prints 6; i=5; i--; print(i); //prints 4; == is for comparing variables. for example: a=5; if (a==5) print("Hello"); //prints Hello
17th May 2019, 10:20 PM
Илья Карпенко UA
Илья Карпенко UA - avatar
+ 1
Thank you guys, I got it.
17th May 2019, 10:26 PM
Miralem Asceric
Miralem Asceric - avatar