Created
July 3, 2019 16:05
-
-
Save jsmanifest/9b70eac1f390ab1838f86b97af19013c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 someFunction = function() { | |
return { | |
names: ['bob', 'joe'], | |
foods: ['apple', 'pineapple'], | |
} | |
} | |
const obj = someFunction() | |
const names = obj['names'] | |
console.log(names) | |
// result: ['bob', 'joe'] | |
console.log(names.joe) | |
// result: undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment