decrement operator in javascript
snippet in javascript

decrement operator in javascript

user4281

// Decrement
let b = 1;
b--; //post decrement
--b; // pre decrement

javascript increment

user7657

x = 0;
//pre-increment
++x;
//post-increment
x++;