title: Call function in variable object using onclick?
body: <p>Okay so here is my problem my javascript is so,</p>
  
  <pre><code>var example = {
      meep: function() {
              alert("This alert or function does not happen using onclick D:");
      }
  }
  </code></pre>
  
  <p>Looks fine right? Okay so now when I do this,</p>
  
  <pre><code>&lt;button onclick="example.meep()"&gt;&lt;/button&gt;
  </code></pre>
  
  <p>It does not work and returns "Uncaught TypeError: undefined is not a function"
  I can also do the function "example.meep()" in console and it works. I've tried it with and without ending parentheses.</p>