I'm not getting the issue of PI should be 3.14

Tell us what’s The code is not working, it keeps telling me PI should be 3.14, which I believe is included already.:
Describe your issue in detail here.

  **Your code so far**

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

object.freeze(MATH_CONSTANTS);
// 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 (Linux; Android 8.1.0; Infinix X624B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.92 Mobile Safari/537.36

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.

Learning to describe problems is hard, but it is an important part of learning how to code.

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

It is Object with a capital O

Object.freeze()

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.