frozen objects



objects are frozen,

never to be extended

or altered again

class Ninja {
  constructor() {
    this.dead = false;
    Object.freeze(this);
  }
}

var shinobi = new Ninja();

shinobi.dead = true;

console.log(shinobi); // Ninja { dead: false }