12 lines
331 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Decrement a Number with JavaScript
---
## Decrement a Number with JavaScript
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
Decrement a number using the '--' operator:
var a = 5;
a--; // Now, 'a' is 4
--a; // Now, 'a' is 3