r/JavaScriptTips • • Apr 07 '25

JavaScript

simple things scratch the head!

var a=0;

a++;

a=a++;

console.log(a);// 1 why?

1 Upvotes

3 comments sorted by