title: javascript chess board string concatenation
body: <p>Why isn't my code working Its suppose to print a chessboard but it seams like its only printing the newline characters? </p>
  
  <p>I am relatively new to JavaScript. Its suppose to determine if the line is number is even or odd and depending and then add  '<code>#</code>' and  ' ' to the board string. If the program is at the end of a row it adds a '<code>\n</code>'.</p>
  
  <pre><code>var width = 8, height = 8;
  
  let board = "";
  
  
  for(let n=0; n&lt;height; n++)
  {
    if(height % 2 === 0)
    {
      for(let i=0; i&lt;width ; i++)
      {
        if(width%2===0)
        {
          board = board + " ";
        }
        else {
          board = board + "#";
        }
        if (i =width-1)
        {
          board = board + "\n";
        }
      }
    }
    else{
      for(let i=0; i&lt;width ; i++)
      {
        if(width%2===0)
        {
          board += "#";
        }
        else {
          board += " ";
        }
        if (i =width-1)
        {
          board = board + "\n";
        }
      }
    }
  }
  console.log(board);
  </code></pre>