Skip to content

Instantly share code, notes, and snippets.

@briandk
Created June 28, 2019 16:06
Show Gist options
  • Save briandk/672a7b88c5837bde36c1492701d983c9 to your computer and use it in GitHub Desktop.
Save briandk/672a7b88c5837bde36c1492701d983c9 to your computer and use it in GitHub Desktop.
What do you predict these expressions will return? Fun with undefined and Object.keys
Object.keys(undefined)
undefined + {}
Object.keys(undefined + {})
(undefined + {})[Object.keys(undefined + {})[23]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment