title: JavaScript const Keyword
body: <p>Does the <code>const</code> keyword in JavaScript create an immutable reference to immutable data structures? [I'm assuming that immutable data structures exist in JavaScript.]</p>
  <p>For <code>string</code> it appears to do so:</p>
  <pre><code>var x = &quot;asdf&quot;;
  const constantX = x;
  
  alert(&quot;before mutation: &quot; + constantX);
  x = &quot;mutated&quot;
  alert(&quot;after mutation: &quot; + constantX);
  </code></pre>
  <p>output:</p>
  <blockquote>
  <p>before mutation: asdf</p>
  <p>after mutation: asdf</p>
  </blockquote>
  <p><a href="http://jsfiddle.net/hVJ2a/" rel="noreferrer">http://jsfiddle.net/hVJ2a/</a></p>