> For the complete documentation index, see [llms.txt](https://kdoore.gitbook.io/cs1334/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kdoore.gitbook.io/cs1334/javascript_syntax/numerical_shortcuts.md).

# Numerical Operator Shortcuts

Some Math Operations are so common that many languages provide shortcut syntax, for example: x = x + 1; can also be written as x++, or as x += 1;

When modifying the value of a variable based on the current value of the variable, the syntax for addition would be:

```javascript
var x = 10;

x = x + 3;  // increment x by 3

x = x - 4;  // decrease x by 4

x = x * 2 // multiply x by 2

x = x / 5 //divide x by 5

///The shortcut syntax for the above

x += 3; 

x -= 4;

x *= 2;

x /= 5;
```
