title: Not understanding arguments of a new function as argument
body: <p>I am following a tutorial to make an upload system for images.</p>
  
  <p>Now the following function is used for uploading, and it uses the external module <strong>formidable</strong></p>
  
  <pre><code>function upload(response, request) {
    console.log("Request handler 'upload' was called.");
  
    var form = new formidable.IncomingForm();
    console.log("about to parse");
    form.parse(request, function(error, fields, files) {
      console.log("parsing done");
  
      fs.rename(files.upload.path, "/tmp/test.png",
        function(error) {
          if (error) {
            fs.unlink("/tmp/test.png");
            fs.rename(files.upload.path, "/tmp/test.png");
          }
        });
        response.writeHead(200, {"Content-Type": "text/html"});
        response.write("received image:&lt;br/&gt;");
        response.write("&lt;img src='/show' /&gt;");
        response.end();
    });
  }
  </code></pre>
  
  <p>form.parse takes 2 arguments, <strong>request</strong> and a <strong>new function</strong> but the new function takes 3 new arguments. </p>
  
  <p>I can't seem to understand it. Where do these 3 new arguments come from? Has it to do with the external library or do I not understand JavaScript correctly?</p>
  
  <p>Thanks in advance.</p>