1
2The Object.entries() method returns an array of a given object's own enumerable string-keyed property [key, value] pairs,
3const object1 = {
4 a: 'somestring',
5 b: 42
6};
7
8for (const [key, value] of Object.entries(object1)) {
9 console.log(`${key}: ${value}`);
10}
11
12// expected output:
13// "a: somestring"
14// "b: 42"
15// order is not guaranteed