title: Is the 'on' method in this node.js code a JavaScript method or a node method?
body: <p>I couldn't find this answer on Google because 'on' is such a common word.
  In this node.js example:</p>
  
  <pre><code>conn.on('close', function() {
  var pos =   connections.indexOf(conn);
      if (pos &gt;= 0) {
          connections.splice(pos, 1);
      }
  });
  </code></pre>
  
  <p>There is a <code>.on</code> method(?). What it does? It is a JavaScript method? Or it is something you only find in node? I'm kind of confused because I think I saw something like <code>.on</code> on jQuery. Is it similar to the jQuery <code>.live</code> event handler?</p>
  
  <p>Can anyone explain this to me?</p>