javascript for loop
var colors=["red","blue","green"];
for (let i = 0; i < colors.length; i++) {
console.log(colors[i]);
}
javascript for loop
var colors=["red","blue","green"];
for (let i = 0; i < colors.length; i++) {
console.log(colors[i]);
}
javascript loop
let array = ['Item 1', 'Item 2', 'Item 3'];
array.forEach(item => {
console.log(item); // Logs each 'Item #'
});
for loop in javascript
For printing 0 to 9
you can write like below also
var i;
for (i = 0; i < 10; i++) {
console.log(i);
}
JavaScript For Loop
for (var i = 0; i < 4; i++) {
}
javascript loop
var colors=["red","blue","green"];
for(let color of colors){
console.log(color)
}
javascript loop
{"coord":{"lon":69.4167,"lat":34.5},"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}],"base":"stations","main":{"temp":294.37,"feels_like":293.07,"temp_min":294.37,"temp_max":294.37,"pressure":1008,"humidity":20,"sea_level":1008,"grnd_level":811},"visibility":10000,"wind":{"speed":1.72,"deg":278,"gust":1.88},"clouds":{"all":0},"dt":1624587596,"sys":{"type":1,"id":7381,"country":"AF","sunrise":1624579865,"sunset":1624631919},"timezone":16200,"id":1138957,"name":"Kabul","cod":200}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us