Hi there,
I dont now why this code doesn’t ask the task. Can anyone help me?
Object.freeze(MATH_CONSTANTS);
Hi there,
I dont now why this code doesn’t ask the task. Can anyone help me?
Object.freeze(MATH_CONSTANTS);
The challenge has a whole lot more code than one line. Please post your full code.
function freezeObj() {
const MATH_CONSTANTS = {
PI: 3.14
};
// Only change code below this line
Object.freeze(MATH_CONSTANTS);
console.log();
// Only change code above this line
try {
MATH_CONSTANTS.PI = 99;
} catch(ex) {
console.log(ex);
}
return MATH_CONSTANTS.PI;
}
const PI = freezeObj();
Can you show what tests pass/fail (via screenshot) when you click Run the Tests?
Thank you but i found the issue.