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

12 lines
254 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
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.