Skip to content

Instantly share code, notes, and snippets.

@liuderchi
Last active May 19, 2018 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liuderchi/09431f3b71f6aefeda2e33156b6b7e48 to your computer and use it in GitHub Desktop.
Save liuderchi/09431f3b71f6aefeda2e33156b6b7e48 to your computer and use it in GitHub Desktop.
語法 包含 Non-Enumerable 屬性? 包含原型鍊? Note
'name' in person ✔️ ✔️ 範圍超過自己本身
Object.getOwnPropertyNames(person) ✔️ no
Object.keys(person) no no Enumerable props ONLY
for (let x in person) no ✔️ Enumerable props ONLY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment