title: does the curly braces change the reading of this function
body: <p>I was writing a function to flatten an array from eloquent javascript using the concat and reduce methods. When i write my code like this:</p>
  
  <pre><code>    function flatten(args){
         return args.reduce((current,i) =&gt;{
             current.concat(i);
         },[] );
     }
  
     let arrays = [[1, 2, 3], [4, 5], [6]];
     console.log(flatten(arrays));
  </code></pre>
  
  <p>i get the following error:</p>
  
  <pre><code>current.concat(i);
                  ^
  
  TypeError: Cannot read property 'concat' of undefined
  </code></pre>
  
  <p>but when i get rid of the curly braces '{}' in this section: </p>
  
  <p>before:</p>
  
  <pre><code>return args.reduce((current,i) =&gt;{
          current.concat(i);
      },[] );
  </code></pre>
  
  <p>after: </p>
  
  <pre><code>return args.reduce((current,i) =&gt;
          current.concat(i)
      ,[] );
  }
  </code></pre>
  
  <p>it prints out just fine. This format works fine when finding a sum with an initialization of 0. does the concat method not recognize the [] when it is within the curly braces '{}'.</p>