Created
April 1, 2019 23:59
-
-
Save rdeprey/505390b782bde475f897bb9f75b7cf30 to your computer and use it in GitHub Desktop.
Get an array of an object's properties using the Object.keys() method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const taco = { | |
tortillaType: 'corn', | |
meat: 'chicken', | |
toppings: 'lettuce, cheese, tomatoes', | |
}; | |
const tacoProperties = Object.keys(taco); | |
console.log(tacoProperties); // Expected output: ['tortillaType', 'meat', 'toppings'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment