create increment and decrement statement in javescript code example
Example 1: decrement operator in javascript
// Decrement
let b = 1;
b--; //post decrement
--b; // pre decrement
Example 2: how to increment variable value in javascript
var a = 1;
function increase(){
var textBox = document.getElementById("text");
textBox.value = a;
a++;
}