Prevent object property extensions

70.8% Acceptance

In this lab, you'll practice using Object.preventExtensions() in JavaScript by creating a function that prevents property extensions on a given object. The Object.preventExtensions() method prevents new properties from being added to an object.

This method is useful when you want to ensure that an object remains constant and doesn't have any properties added to it accidentally or unexpectedly later on in the code.