Course Content
Introduction to JavaScript
Increment and Decrement
Increment and decrement are operations that increase/decrease the variable value by 1
.
Increment
This operations perform by ++
operator:
Note
a++
equal toa = a + 1
ora += 1
.
Decrement
This operation perform by --
operator:
Note
a--
equal toa = a - 1
ora -= 1
.
Increment and decrement are often used in loops, which we will cover later.
Section 3.
Chapter 4