JavaScript Program to Loop Through an Object
let obj = {a: 1, b: 2, c: 3};
for (let prop in obj) {
console.log(`obj.${prop} = ${obj[prop]}`);
}
JavaScript Program to Loop Through an Object
let obj = {a: 1, b: 2, c: 3};
for (let prop in obj) {
console.log(`obj.${prop} = ${obj[prop]}`);
}
© 2024 python tutorials. python-tutorials.in