Javascript freeeze

alright, hello campers, my code is thrrowing me errors plz can you help me out. the errror is "object not defined
"

  **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 (X11; Ubuntu; Linux x86_64; rv:92.0) Gecko/20100101 Firefox/92.0

Challenge: Prevent Object Mutation

Link to the challenge:

1 Like

seem object should be capitalized first letter: Object.freeze…

Thanks, that should help

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