title: string concat replacing second string arg too, possible es6 issue
body: <p>I am writing code to create a chess board in es6 for a nodejs project</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const XPOSITIONS = [{
                      "name": 'a',
                      "index": 0
                          },
                      {
                      "name": 'b',
                      "index": 1
                          },
                      {
                      "name": 'c',
                      "index": 2
                          },
                      {
                      "name": 'd',
                      "index": 3
                          },
                      {
                      "name": 'e',
                      "index": 4
                          },
                      {
                      "name": 'f',
                      "index": 5
                          },
                      {
                      "name": 'g',
                      "index": 6
                          },
                      {
                      "name": 'h',
                      "index": 7
                          }
                      ];
  const YPOSITIONS = [{
                      "name": '1',
                      "index": 1
                          },
                      {
                      "name": '2',
                      "index": 2
                          },
                      {
                      "name": '3',
                      "index": 3
                          },
                      {
                      "name": '4',
                      "index": 4
                          },
                      {
                      "name": '5',
                      "index": 5
                          },
                      {
                      "name": '6',
                      "index": 6
                          },
                      {
                      "name": '7',
                      "index": 7
                          },
                      {
                      "name": '8',
                      "index": 8
                          }
                      ];
  
  function makeboard() {
      "use strict";
  
      var boardArray = Array(...Array(...XPOSITIONS)).map(() =&gt; Array(...YPOSITIONS));
    
      XPOSITIONS.forEach(function(x, xindex, xarray) {
          // console.log("x" + xindex);
        
          YPOSITIONS.forEach(function(y, yindex, yarray) {
              // console.log("y" + yindex);
              // console.log("x check" + xindex, x.index);
  
              boardArray[xindex][yindex].name = x.name.concat(y.name);
              console.log("xindex " + xindex, "yindex " + yindex, "xname " + x.name, "yname " + y.name, boardArray[xindex][yindex].name);
              boardArray[xindex][yindex].xindex = x.index;
              boardArray[xindex][yindex].yindex = y.index;
          });
          // console.log(boardArray);
      });
      return boardArray;
  }
  
  var board = makeboard();</code></pre>
  </div>
  </div>
  </p>
  
  <p>. I have <strong>const</strong> (constants) for edges name like this</p>
  
  <pre><code>const XPOSITIONS = [{
                  "name": 'a',
                  "index": 0
                      },...
  const YPOSITIONS = [{
                  "name": '1',
                  "index": 1
                      },...
  </code></pre>
  
  <p>I have mapped them to create a 8X8 2d array</p>
  
  <pre><code>var boardArray = Array(...Array(...XPOSITIONS)).map(() =&gt; Array(...YPOSITIONS));
  </code></pre>
  
  <p>Then I try to assign each square in this 2d array it's name in forEach loop</p>
  
  <pre><code>XPOSITIONS.forEach(function(x, xindex, xarray) {
      YPOSITIONS.forEach(function(y, yindex, yarray) {
  
          boardArray[xindex][yindex].name = x.name.concat(y.name);
  
      });
  </code></pre>
  
  <p>But the problem is after each board square name assignment <code>y.name</code> also changes like so does the square name</p>
  
  <pre><code>yname a1
  yname a2
  yname a3
  yname a4
  yname a5
  yname a6
  yname a7
  yname a8
  yname ba1
  yname ba2
  yname ba3
  yname ba4
  yname ba5
  yname ba6
  yname ba7
  yname ba8
  yname cba1
  yname cba2
  yname cba3
  yname cba4
  yname cba5
  yname cba6
  yname cba7
  yname cba8
  yname dcba1 
  yname dcba2 
  yname dcba3 
  yname dcba4 
  yname dcba5 
  yname dcba6 
  yname dcba7 
  yname dcba8 
  yname edcba1...
  </code></pre>
  
  <p>What could be the issue, or what am I doing wrong. Please help I am new to es6 and also not very great with javascript.</p>
  
  <p><strong>See code snippet in developer console</strong></p>