Skip to content

Instantly share code, notes, and snippets.

@toddpress
Forked from deleteman/symbol-keys.js
Created August 26, 2021 01:25
Show Gist options
  • Save toddpress/19f272c51b6392c2abcecd4ca5b534d0 to your computer and use it in GitHub Desktop.
Save toddpress/19f272c51b6392c2abcecd4ca5b534d0 to your computer and use it in GitHub Desktop.
let obj = {}
obj[Symbol.for('unique_prop')] = 10;
console.log(obj[Symbol.for('unique_prop')]); //This will print 10!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment