Tell us what’s happening:
HELP ERROR:
object is not defined
object is not defined
object is not defined
object is not defined
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:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/prevent-object-mutation