title: javascript addEventListener doesn't work
body: <p>I in this simple code there is something that interesting.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  function run() {
   var btn = document.getElementById('run');
   function changeBg() {
    document.body.style.backgroundColor = "red";
   }
   btn.addEventListener("click",changeBg,false);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;button id="run" onclick="run()"&gt;Run The Function&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I click to the button the function doesn't work for first. it's working in the second click. I don't understand this. Can someone tell me why this happens ? </p>