This lesson take an extensive look at the addition of the Object.values functions, how they can be used to gather information about the values of an object’s own enumerable string-key properties
Instructor: Let's look at the object.values method that's introduced in ES2017. Let's describe our day using an object. We'll add in properties like wake-up time and make it equal to the new date. Let's also add a list of gadgets, laptop and phone.
Now, let's capture the actual values from the object using object.values method. Here, we'll pass in our day object. Then, we'll go ahead and log the values that we have captured. Now, let's go to the terminal and run our index file in node.
You can see that it outputs a list of objects. You can see that the first one is the value of wake-up time that is the new date, and the second one is the value of gadgets that is the array of laptop and phone.
Let's test the same for functions. We'll add a function called as goToWork and we'll simply console log work inside it. Now, if we go ahead and run this file in node, you can see that it outputs a function with the name goToWork in the list of objects.