Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
20 lines (14 sloc) 298 Bytes

Loops

Here's a quick example loop:

var i = 0

while (i < 3) {
  console.log('The number is ' + i)
  i++
}

This code will output the following message in your console:

The number is 0
The number is 1
The number is 2

Here it is animated.

You can’t perform that action at this time.