Skip to content

Instantly share code, notes, and snippets.

@smamran
Forked from coreyc/getValuesFromObjectKeys.js
Created September 22, 2015 00:50
Show Gist options
  • Save smamran/d85c9c3f25544d739b96 to your computer and use it in GitHub Desktop.
Save smamran/d85c9c3f25544d739b96 to your computer and use it in GitHub Desktop.

Revisions

  1. s.m.amran revised this gist Sep 22, 2015. No changes.
  2. @coreyc 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);