javascript - What is the difference between x++ and ++x -
possible duplicate:
incrementing in c++ - when use x++ or ++x?
what difference between x++ , ++x ?
x++
executes statement , increments value.
++x
increments value , executes statement.
var x = 1; var y = x++; // y = 1, x = 2 var z = ++x; // z = 3, x = 3
Comments
Post a Comment