Tell us what’s happening:
I used the Object.freeze on it and everything seems to be working well. The last test that says PI equals 3.14 isn’t passing . In the console or test box it says PI equals 3.14. is this a glitch or did I mess up?
Your code so far
function freezeObj() {
"use strict";
const MATH_CONSTANTS = {
PI: 3.14
};
// change code below this line
Object.freeze();
// 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:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.
Link to the challenge:
