bradxr
8/4/2018 - 2:33 PM

Prevent Object Mutation

Objects can be frozen to prevent them from being mutated Once an object is frozen, you can no longer add, update, or delete properties

// declaring object
let obj = {
  name: "FreeCodeCamp",
  review: "Awesome"
};

// freezing object
Object.freeze(obj);