array of key value pairs javascript iterate code example
Example: loop through key value pairs js
for (const [key, value] of Object.entries(object1)) {
console.log(`${key}: ${value}`);
}
for (const [key, value] of Object.entries(object1)) {
console.log(`${key}: ${value}`);
}