title: What is the meaning of using done as a parameter in a javascript function?
body: <p>i am learning Javascript, and it seems that the done as a parameter in a function is a difficult concept to understand.
  I want to know why it does behaves like that (done as a parameter (completed process signal i guess), and if there is some good book or resource Online to study further this concept.
  <strong>Example</strong>, i am following along with a Tutorial and it uses done as a parameter, the thing is that when i run the code on node via gulp (gulpfile.js) the process never stops when using done, if i choose to skip done in the code it runs smoothly. I am trying to track down the problem, and i know that the problem is the done as a parameter, ( it has been checked by me multiple times).</p>
  
  <pre><code>gulp.task('clean-styles', function(done) {
      var files = config.temp + '**/*.css';
      clean(files, done);
  });
  
  
  function clean(path, done) {
      log('Cleaning: ' + $.util.colors.blue(path));
      del(path, done).then(function(path) {
          console.log("path=",util.inspect(path,false,null))
          console.log('Deleted Files\/Folders:\n', path.join('\n'));
          console.log('Finishing clean')
      });
  }
  </code></pre>
  
  <ul>
  <li>node version: 0.12.4</li>
  <li>npm version: 2.10.1</li>
  <li>gulp version: 3.9.0</li>
  </ul>
  
  <p><strong><em>Thanks a lot</em></strong> for any help, it will be really appreciated.
  Salutations.</p>