title: Is the 'foreach' loop here behaving in parallel or squential?
body: <p>I am new to javascript and I am trying to debug this piece of code, I was given in my class</p>
  
  <pre><code>fs.readdir('.', function(err, filenames) {
    if (err) throw err;
    console.log("Number of Directory Entries:", filenames.length)
    filenames.forEach(function (name) {
      fs.stat(name, function(err, stats) {
        if (err) throw err;
        total += stats.size;
      });
    });
  });
  </code></pre>
  
  <p>I would like to know what is the program flow of the for-each will be? Will be in parallel or sequential? The instructor said that it is parallel,  however from what I have read on the web,it seems it is sequential.</p>
  
  <p>Is there anyway, I can tell by debugging like in java?</p>