C # Prefix and Post fix Forms | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

C # Prefix and Post fix Forms

Is this example correct cause I was having trouble with this and I used this in html a=0 and b=7 So : a = b++ ( As you see the ++ is after b so it will be executed after a=b ) **Result** a=7 b=8 And for : a = ++b ( Now we have the ++ before b that will affect the execution of a=b which mean b will be b + 1 before a=b ) **Result** a=8 b=8

7th Aug 2018, 1:29 AM
Rohit Singh
Rohit Singh - avatar
3 Answers
+ 1
Yes, your example is correct, I think. But how did you use it in HTML? But as code your example wouldn't work, because you havent defined the types of a and b and you havent used semicolons.
7th Aug 2018, 5:11 AM
Joel Kronqvist
Joel Kronqvist - avatar
+ 1
Actually my bad it is java script But thank you.
7th Aug 2018, 11:39 AM
Rohit Singh
Rohit Singh - avatar
+ 1
Rohit Singh You're welcome . Huh, I thought you used something like <1+1> or something else that doesn't exist😅
7th Aug 2018, 11:45 AM
Joel Kronqvist
Joel Kronqvist - avatar