Answers for "javascript for loop to genreate html"

21

for in loop javascript

var person = {"name":"taylor","age":31};
for (property in person) {
	console.log(property,person[property]);
}
//name taylor
//age 31
Posted by: Guest on January-17-2020
20

javascript for eac loop

var colors = ["red", "blue", "green"];
colors.forEach(function(color) {
    console.log(color);
});
Posted by: Guest on July-19-2019

Python Answers by Framework

Browse Popular Code Answers by Language