1Object.entries(obj).forEach(
2 ([key, value]) => console.log(key, value)
3);
1const point = {
2 x: 10,
3 y: 20,
4};
5
6for (const [axis, value] of Object.entries(point)) {
7 console.log(`${axis} => ${value}`);
8}
9
10/** prints:
11 * x => 10
12 * y => 20
13 */