mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-15 06:07:34 -05:00
12 lines
254 B
Markdown
12 lines
254 B
Markdown
---
|
|
title: Increment a Number with JavaScript
|
|
---
|
|
You can easily increment or add `1` to a variable with the `++` operator.
|
|
|
|
i++;
|
|
|
|
is the equivalent of
|
|
|
|
i = i + 1;
|
|
|
|
**Note** The entire line becomes `i++;`, eliminating the need for the equal sign. |