Open CyanSalt opened 4 years ago
path: js-property-question
function getObject() {} function getKey() {} let obj = getObject(); let key = getKey(); let valueA = obj[key]; let valueB = 3; obj[key] = valueB let valueC = obj[key]; assert(isNaN(valueA)); // false assert(isNaN(valueC)); // false assert(valueA === valueB); // false assert(valueB === valueC); // false assert(valueA === valueC); // false
function getObject() { return localStorage; } function getKey() { return 'length'; }
path: js-property-question