Javascript pre-increment vs post-increment vs increment-equal
Javascript pre-increment vs post-increment vs increment-equal
Test on:Node v.14.17.3Pre-increment – increment then read the variable, example:++jPost-increment – read the variable then increment, example:k++Increment-equal – increment then read the variable, example:l+=1Test code: console.log('--- j'); let j = 1; console.log(++j); console.log(j); console.log('--- k'); let k = 1; console.log(k++); console.log(k); console.log('--- l'); let l =…
View On WordPress












