Skip to content

Instantly share code, notes, and snippets.

@khg0712
Created May 1, 2018 14:48
Show Gist options
  • Save khg0712/e35f657afde78273eaa9570798662617 to your computer and use it in GitHub Desktop.
Save khg0712/e35f657afde78273eaa9570798662617 to your computer and use it in GitHub Desktop.
Symbol('a') == Symbol('a') //결과: false
//각 심볼이 고유의 값을 가지고 있어 서로 다름
Symbol('a') == Symbol.for('a') // 결과: false
Symbol.for('a') == Symbol.for('a') //결과: true
//전역 레지스트리에서 같은 키의 심볼은 공유하므로 서로 같다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment