for object loop js code example
Example 1: javascript loop through object
Object.entries(obj).forEach(
([key, value]) => console.log(key, value)
);
Example 2: javascript iterate over object
for (variable in object)
statement
Object.entries(obj).forEach(
([key, value]) => console.log(key, value)
);
for (variable in object)
statement