Even after copy & pasting the answer, it’s throwing an error. I’ve clicked reset, then refreshed the browser, then restarted the browser and eventually restarted the whole system.
One of my first wrong guesses was to freeze the function instead of the object, could the cache be holding onto that in some way?
Your code so far
function freezeObj() {
"use strict";
const MATH_CONSTANTS = {
PI: 3.14
};
// change code below this line
Object.freeze(MATH_CONSTANTS);
// change code above this line
try {
MATH_CONSTANTS.PI = 99;
} catch( ex ) {
console.log(ex);
}
return MATH_CONSTANTS.PI;
}
const PI = freezeObj();
Your browser information:
Chrome
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.
Link to the challenge: