+ 5
++x and x++
var x = 5 document.write(x) //5 var y = ++x // x=x+1 and y=x document.write(y) //6 document.write(x) //6 var z = x++ //z=x and x=x+1 document.write(z) //6 document.write(x) //7
6 Answers
+ 7
end of line comments are very helpful....thank you
+ 4
It is a good example. It's explanation!
+ 3
explanation
+ 3
It's a pity that some people ask questions in a way other people describe answers. So you can not be sure anymore what it is, but I agree it's a good example :)
+ 1
x ++ increments after using the variable.
++x increments before use.
0
Is this a question or an explanation?