Skip to content

Instantly share code, notes, and snippets.

@coreyc
Created September 22, 2015 00:21
Show Gist options
  • Save coreyc/b0e82d21b2293f0b3fd1 to your computer and use it in GitHub Desktop.
Save coreyc/b0e82d21b2293f0b3fd1 to your computer and use it in GitHub Desktop.

Revisions

  1. coreyc created this gist Sep 22, 2015.
    7 changes: 7 additions & 0 deletions getValuesFromObjectKeys.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    var inputObject = { 0: 'a', 1: 'b', 2: 'c' };
    var values = [];
    Object.keys(inputObject).forEach(function(key) {
    values.push(inputObject[key]);
    return values;
    });
    console.log(values);