How to increment a variable in JavaScript?

To increment a variable in JavaScript, do this: variable++.

Here's how you do it:

let counter = 3;

counter++;

console.log(counter); // 4