For In Loop
Looping through properties.
Examples
Looping Object
Iterating over object keys.
const person = {fname:"John", lname:"Doe", age:25};
let txt = "";
for (let x in person) {
txt += person[x] + " ";
}
console.log(txt); // John Doe 25Test Your Knowledge
JavaScript Quiz
No quiz available for this topic yet.