for loop javscritp code example
Example 1: for loop javascript
var i;
for (i = 0; i < cars.length; i++) {
text += cars[i] + "<br>";
}
Example 2: for loop javascript
var i;
for (i = 0; i < 10 ; i++) {
//do something
}
var i;
for (i = 0; i < cars.length; i++) {
text += cars[i] + "<br>";
}
var i;
for (i = 0; i < 10 ; i++) {
//do something
}