for in loop javascript

JavaScript
const array1 = ['a', 'b', 'c'];

for (const element of array1) {
  console.log(element);
}

// expected output: "a"
// expected output: "b"
// expected output: "c"
for(i=0;i<=5;i++){
  console.log(i);}let array = ['Item 1', 'Item 2', 'Item 3'];

for (let index = 0; index < array.length; index++) {
  console.log("index", index);
  console.log("array item", array[index]);
}for (i = 0; i < 5; i++) {
   text += "The number is " + i + "<br>";
}  var colors = ["red", "green", "blue"];
for(var i = 0; i < colors.length; i++)
{
 console.log(colors[i]); 
}var person = {"name":"taylor","age":31};
for (property in person) {
	console.log(property,person[property]);
}
//name taylor
//age 31
Source

Also in JavaScript: