1The entries() method returns a new Array Iterator
2object that contains the key/value pairs for each index in the array.
1const object1 = { a: 'somestring', b: 42 };
2for (const [key, value] of Object.entries(object1)) {
3 console.log(`${key}: ${value}`);
4} // expected output: "a: somestring" "b: 42" order is not guaranteed