title: TypeError: Functionname is not a function at HTMLButtonElement.onClick
body: <p>I'm pretty new to Javascript and playing around with it at the moment. However, I can't actually test my code because I get the following error:</p>
  
  <pre><code>Uncaught TypeError: namecaller is not a function
  at HTMLButtonElement.onclick (Tools.html:101)
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>div id="content"&gt;
      &lt;script&gt;
          function namecaller(){
              var a = "scurvy";
              var b = "dog";
              document.getElementById("namecaller").innerHTML = "You are a " + a + " " + b;
          }
      &lt;/script&gt;
  Namecaller&lt;/p&gt;
  &lt;button type="button" onclick="namecaller()"&gt;
  You are a...&lt;/button&gt;
  </code></pre>
  
  <p>I have no clue why it doesn't work, looked at other StackOverflow questions and also at the W3 tutorials.</p>