increment operator in javascript code example
Example 1: javascript increment
x = 0;
//pre-increment
++x;
//post-increment
x++;
Example 2: increment operator in javascript
// Increment
let a = 1;
a++; // Post Increment
++a; // Pre Increment
x = 0;
//pre-increment
++x;
//post-increment
x++;
// Increment
let a = 1;
a++; // Post Increment
++a; // Pre Increment