ECMAScript 5 introduce several methods to prevent modification of object which lock down object to ensure that no one, accidentally or otherwise, change functionality of Object. There are three levels of preventing modification: 1: Prevent extensions : No new properties or methods can be added to the object, but one…