Skip to content

Instantly share code, notes, and snippets.

@meetzaveri
Created January 17, 2018 07:13
Show Gist options
  • Save meetzaveri/3d96d1255b4cbe85922ef0b0d25eeb90 to your computer and use it in GitHub Desktop.
Save meetzaveri/3d96d1255b4cbe85922ef0b0d25eeb90 to your computer and use it in GitHub Desktop.
This snippet performs the function of taking out value from key-value pair(Objects) and storing them in an array.
const enumarr = Object.entries(this.state);
const newarr = [];
for(let i = 0; i<=enumarr.length - 1 ;i++){
newarr.push(enumarr[i][1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment