Skip to content

Instantly share code, notes, and snippets.

@Giayychan
Created April 27, 2020 04:46
Show Gist options
  • Save Giayychan/9dbc80bcdd22196a24a8581b3ea89b93 to your computer and use it in GitHub Desktop.
Save Giayychan/9dbc80bcdd22196a24a8581b3ea89b93 to your computer and use it in GitHub Desktop.
return an array containing the given object's own enumerable property values.
const object1 = {
a: 'somestring',
b: 42,
c: false
};
console.log(Object.values(object1));
// expected output: Array ["somestring", 42, false]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment