1const object1 = {
2 a: 'somestring',
3 b: 42,
4 c: false
5};
6
7console.log(Object.values(object1));
8// expected output: Array ["somestring", 42, false]
9
10> Array ["somestring", 42, false]
11
12Object.values(obj)
1const object1 = {
2 a: 'somestring',
3 b: 42
4};
5
6for (let [key, value] of Object.entries(object1)) {
7 console.log(`${key}: ${value}`);
8}
9
10// expected output:
11// "a: somestring"
12// "b: 42"
13// order is not guaranteed