title: JavaScript custom Event Listener
body: <p>I was wondering if anyone can help me understand how exactly to create different Custom event listeners.</p>
  
  <p>I don't have a specific case of an event but I want to learn just in general how it is done, so I can apply it where it is needed.</p>
  
  <p>What I was looking to do, just incase some folks might need to know, was:</p>
  
  <pre><code>var position = 0;
  
  for(var i = 0; i &lt; 10; i++)
  {
      position++;
      if((position + 1) % 4 == 0)
      {
          // do some functions
      }
  }
  </code></pre>