var a=1; var b=++a; console.log(b); //2 console.log(a); //2 var a=1; var b=a++; console.log(b); //1 console.log(a); //2