loop in javascript

JavaScript
var colors=["red","blue","green"];
for (let i = 0; i < colors.length; i++) { 
  console.log(colors[i]);
}// infinite for loop
for(let i = 1; i > 0; i++) {
    // block of code
}var nums = [1, 2, 3, 5];
for (var i = 0; i,nums.length; i++){
	console.log(nums[i]);
}  var listItem = [
        {name: 'myName1', gender: 'male'},
        {name: 'myName2', gender: 'female'},
        {name: 'myName3', gender: 'male'},
        {name: 'myName4', gender: 'female'},
      ]

    for (const iterator of listItem) {
        console.log(iterator.name+ ' and '+ iterator.gender);
    }for(i=0;i<=5;i++){
  console.log(i);}var colors=["red","blue","green"];
for(let color of colors){
  console.log(color)
}
Source

Also in JavaScript: