title: Calling a method on every instance of a class in Javascript?
body: <p>I am trying to call a class' method on every instance of that class.</p>
  
  <p>Currently, I have all of my classes stored in an array, called <code>checkers[]</code></p>
  
  <p>I loop through every instance of the class <code>Checker()</code> using this for loop:</p>
  
  <pre><code>this.drawCheckers = function() {
      for(var checker in this.checkers) {
          checker.draw();
      }
  }
  </code></pre>
  
  <p>When I run the code, I get the error:
  <code>localcheckers.js:57 Uncaught TypeError: checker.draw is not a function</code></p>
  
  <p>How would I fix this?</p>