title: What is the difference between 'let' and 'const' ECMAScript 2015 (ES6)?
body: <p>I'm wondering what is the difference between <code>let</code> and <code>const</code> in <strong>ES6</strong>. Both of them are block scoped, as the example in the following code:</p>
  
  <pre><code>const PI = 3.14;
  console.log(PI);
  
  PI = 3;
  console.log(PI);
  
  const PI = 4;
  console.log(PI);
  
  var PI = 5;
  console.log(PI);
  </code></pre>
  
  <p>In ES5 the output will be:</p>
  
  <pre><code>3.14
  3.14
  3.14
  3.14
  </code></pre>
  
  <p>But in ES6 it will be:</p>
  
  <pre><code>3.14
  3
  4
  5
  </code></pre>
  
  <p>I'm wondering why <strong>ES6</strong> allows the change of <code>const</code> value, the question is why should we use 'const' now? we can use 'let' instead?</p>
  
  <p><strong>Note</strong>: <a href="http://jsbin.com/nularebi/2/edit" rel="noreferrer">jsbin</a> can be used for testing, choose <strong>JavaScript</strong> to run <strong>ES5</strong> code and <strong>Traceur</strong> to run it with <strong>ES6</strong> capabilities.</p>