Start from the same counter and compare ++n (pre) with n++ (post). Pre-increment is useful when you need the updated number in the same expression.

Results appear here.

Pick a starting value, then run a button.

Important JavaScript

let n = 5;
const pre = ++n;  // n becomes 6, pre is 6

let m = 5;
const post = m++; // post is 5, then m becomes 6

// Same idea for --n (pre-decrement) and n-- (post-decrement).