using shortcuts in your javascript code example
Example 1: javascript variable shortcuts
// adds 1 to A
A++;
// subtracts 1 from A
A--;
// adds B to A
A += B;
// subtracts B from A
A -= B;
// multiplies A by B
A *= B;
// devides A by B
A \= B;
Example 2: js shortcut
document.addEventListener('keydown', (e) => {
if (e.ctrlKey && String.fromCharCode(e.keyCode).toLowerCase() === 's') {
e.preventDefault();
e.stopPropagation();
// Do some stuff...
}
}, false);