Last active
September 11, 2021 09:06
-
-
Save QuatoHub/dc6e323ca1b8aaf9a2a55fc13bdf17c8 to your computer and use it in GitHub Desktop.
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
// 심벌 값 생성 | |
let key = Symbol("key"); | |
console.log(typeof keey); // symbol | |
// 객체 생성 | |
let obj = {}; | |
// 이름이 충돌할 위험이 없는 유일무이한 값이 심벌의 프로퍼티 키로 사용 | |
obj[key] = "value"; | |
console.log(obj[key]); // value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment