In JavaScript you can use ++ operator before (pre-increment) or after the variable name (post-increment). What, if any, are the differences b
++
var a = 1; var b = ++a; alert('a:' + a + ';b:' + b); //a:2;b:2 var c = 1; var d = c++; alert('c:' + c + ';d:' + d); //c:2;d:1
jsfiddle