After running tests on both CodeAcademy's editor and Chrome's console, I came across an interesting observation. I noticed that the argument of console.log()
is not evaluated first even if it is an expression. Why does this happen?
var x = 0;
console.log(x++); // displays 0 instead of 1
console.log(x); // displays 1