title: Difference between freeze and seal
body: <p>I just heard about the JavaScript methods <code>freeze</code> and <code>seal</code>, which can be used to make any Object immutable.</p>
  
  <p>Here's a short example how to use it:</p>
  
  <pre><code>var o1 = {}, o2 = {};
  Object.freeze(o2);
  
  o1["a"] = "worked";
  o2["a"] = "worked";
  
  alert(o1["a"]);   //prints "worked"
  alert(o2["a"]);   //prints "undefined"
  </code></pre>
  
  <p>What is the difference between <code>freeze</code> and <code>seal</code>? Can they increase performance?</p>