freeCodeCamp/guide/english/javascript/tutorials/decrement-a-number-with-jav.../index.md

12 lines
260 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Decrement a Number with JavaScript
---
You can easily decrement or decrease a variable by `1` with the `--` operator.
i--;
is the equivalent of
i = i - 1;
**Note:** The entire line becomes `i--;`, eliminating the need for the equal sign.