JavaScript: For Loop

nick3499
1 min readMar 17, 2017

--

for (var i = 0; i < 10; i++){
console.log('Hello World!');
}

for (var i = 0; i < 10; i++) defines the loop. var i = 0; initializes the loop. i < 10 is the exit condition which limits the loop to ten repetitions. i++ is the increment factor which increases the value of i by one with each repetition.

--

--

nick3499
nick3499

Written by nick3499

coder of JavaScript and Python

No responses yet