Es8 has introduced a new cool feature called Object.values()
that can be used to get the values of an object.
with Object.values
instead of iterating through every element of object we can use it to return all values an object in array.
const cars = {
'Toyota': 'Camry',
'Ford': 'Fiesta',
'Honda': 'Civic'
};
const carsValue = Object.values(cars);
//['Camry', 'Fiesta', 'Civic']