Chrome Extension

For loop in Javascript

for (var i = 0; i < 5; i++) {
    console.log(i);
}
We are a bunch of lazy programmers so we developed this chrome extension
search code from your favorite search engine
Install Now

Nested for loop

for (var i = 0; i < 5; i++) {
    for (var j = 0; j < 2; j++) {
        console.log(i, j);
    }
}

Loop on array

var my_array = ["Apple", "banana", "Orange"];

for (var i = 0; i < my_array.length; i++) {
    console.log(my_array[i]);
}
Was this helpful?
0 Comments
Open Code Manager We are hiring