Prevent Object Mutation not progressing

Tell us what’s happening:
I’m unable to proceed from this challenge. After getting it right, or so I assume, it keeps showing me PI equals 3:14. I don’t know what that means or how to proceed or how to get a good for the 4th goal

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();


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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36.

I have progressed. Thank you.

2 Likes