title: I need help understanding event handlers and functions in JavaScript?
body: <p>I wrote HTML document and linked to my JS document.</p>
  <p>when I execute the HTML file on my browser it only shows the &quot;Click me!&quot; button, but what I expected it to do was to show the result of my math function when clicked. But .. nothing happens. I'm very new to JavaScript so I'm sure this is a simple answer, but Googling isn't helping ... I appreciate any insight to what I'm doing wrong here.</p>
  <p>Here's the code from HTML file:</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;&quot;en&quot;&gt;
      &lt;head&gt;
          &lt;meta charset=&quot;UTF-8&quot;&gt;
          &lt;script src=&quot;JS/main.js&quot;&gt;&lt;/script&gt;
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;p id=&quot;Math&quot;&gt;
          &lt;button onclick=&quot;myFunction()&quot;&gt;Click me!&lt;/button&gt;
          &lt;/p&gt;
      
      &lt;/body&gt;
    &lt;/html&gt;
  </code></pre>
  <p>Here's the JS file:</p>
  <pre><code>function myFunction(a, b) {return a * b;}
  
  document.getElementById(&quot;Math&quot;) .innerHTML = myFunction(13, 4);
  </code></pre>