title: Why is my loop looping just once even though there are 3 items?
body: <p>The following code loops through files and output their names plus some xhtml:</p>
  
  <pre><code>#! /usr/bin/env node
  
  var fs = require('fs'),
      files = fs.readdirSync(__dirname + '/files/')
  
  console.log(files.length)
  
  var manifest = function() {
    for (let i = 0, l = files.length; i &lt; l; ++i) {
      let contents = fs.readFileSync(__dirname + '/files/' + files[i], 'utf8')
      return `&lt;item href="${files[i]}.html" id="html30" media-type="application/xhtml+xml"/&gt;\n`
    }
  }
  
  console.log(manifest())
  </code></pre>
  
  <p>The output is this:</p>
  
  <pre><code>alex@alex-K43U:~/node/m2n3/bin$ node content.js
  &lt;item href="foo1.txt.html" id="html30" media-type="application/xhtml+xml"/&gt;
  </code></pre>
  
  <p>Which is weird, because there are three files. <code>console.log(files.length)</code> outputs:</p>
  
  <pre><code>alex@alex-K43U:~/node/m2n3/bin$ node content.js
  3
  </code></pre>
  
  <p>What could be the problem?</p>