lenght function in java script for loop code example
Example 1: javascript loop through array
const array1 = ['a', 'b', 'c'];
array1.forEach(element => console.log(element));
Example 2: for in loop javascript
var person = {"name":"taylor","age":31};
for (property in person) {
console.log(property,person[property]);
}
//name taylor
//age 31