Write Your JavaScript Code Here

const object1 = { // Creates an object named object1 with property1 set to 22 property1: 22 }; const object2 = Object.freeze(object1); // Freezes object1 and assigns it to object2 object2.property1 = 33; // Attempting to modify property1 of object2 (which is frozen) - this line will throw an error in strict mode // Throws an error in strict mode console.log(object2.property1); // Logs the value of property1 of object2 to the console (it remains 22)

Output: