title: Callback function example
body: <p>I am having a hard time understanding how the <code>callback()</code> function is used in the following code block.</p>
  <p>How are we using <code>callback()</code> as a function, in the function body, when <code>function callback()</code> has not been defined?</p>
  <p>What are the repercussions of passing true / false as parameters into the callback function below?</p>
  <p>I appreciate any clarification, thanks in advance!</p>
  <pre><code>socket.on('new user', function(data, callback){
      if (nicknames.indexOf(data) != -1){
          callback(false);
      } else{
          callback(true);
          socket.nickname = data;
          nicknames.push(socket.nickname);
          updateUserList();
      }
  });
  </code></pre>