title: JavaScript button onclick not working
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button onclick="hello()"&gt;Hello&lt;/button&gt;
  
  &lt;script&gt;
    function hello() {
      alert('Hello');
    }
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is my code. But it's not working. When I click on the button nothing happens.</p>