title: Function.prototype.bind with null as argument
body: <p>I got quite confused with <code>Function.prototype.bind()</code> method. </p>
  
  <pre><code>function playsound(raw) {        
  }
  
  function onfilechange(then, evt) {
      var reader = new FileReader();
      reader.onload = function (e) {
          console.log(e);
          then(e.target.result);
      };
      reader.onerror = function (e) {
          console.error(e);
      };
      reader.readAsArrayBuffer(evt.target.files[0]);
  }
  
  
  document.getElementById('file')
    .addEventListener('change', onfilechange.bind(null, playsound), false);
  </code></pre>
  
  <p>Can anyone explain to me what this code fragment does? The <code>this</code> is null and second argument is the <code>playsound</code> function. I am not quite understanding the usage behind the below line.</p>
  
  <pre><code>onfilechange.bind(null, playsound)
  </code></pre>