Created
August 26, 2015 16:16
-
-
Save patricksimpson/1b085010414162cfa2c1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const MY_KEY = Symbol(); | |
let obj = { | |
[MY_KEY]: 123 | |
}; | |
"use strict"; | |
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | |
var MY_KEY = Symbol(); | |
var obj = _defineProperty({}, MY_KEY, 123); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment