Help somebody, i tryed everything<3

Tell us what’s happening:

Your code so far


function freezeObj() {
const MATH_CONSTANTS = {
  PI: 3.14
};
// Only change code below this line
object.freeze(MATH_CONSTANSTS);

// Only 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 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36 OPR/72.0.3815.400.

Challenge: Prevent Object Mutation

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

The more information you give us, the more likely we are to be able to help.

1 Like

You have two typos in your code.

1 Like