Skip to content

Instantly share code, notes, and snippets.

@jonathan-fielding
Created February 17, 2021 19:30
Show Gist options
  • Save jonathan-fielding/b828f2206ec77e7b66598c4ec2eda0ac to your computer and use it in GitHub Desktop.
Save jonathan-fielding/b828f2206ec77e7b66598c4ec2eda0ac to your computer and use it in GitHub Desktop.

Revisions

  1. jonathan-fielding created this gist Feb 17, 2021.
    7 changes: 7 additions & 0 deletions object-keys.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    const person = {
    name: 'Jonathan',
    age: 21,
    gender: 'male'
    }

    console.log(Object.keys(person)); // Result [ 'name', 'age', 'gender' ]