What are the differences between these two expressions?
x++
and ++x
This is the code I was trying to understand:
var x=1, y=1, z=0;
do{
z=x+y;
console.log("z= "+ z);}
while(++x<=1 && y++>1);
console.log ("++x="+x + " y++="+y);
z+=x+y;
document.write(z);
NOTE: I have found this same question but answer for Java and I do not know if the answer is correct for JavaScript