title: TypeError when checking vertical matches in game grid
body: <p>I have a 13x13 multidimensional array, and I am attempting to check for vertical matches using this function: </p>
  
  <pre><code>function verticalMatch(row, col){
    for(var i = -1; i &lt;= 1; i++) {
    if (gameBoard[row + i][col]==="O" &amp;&amp; gameBoard[row + i + 1][col] === "O"
        &amp;&amp; gameBoard[row +i-1][col] === "X" &amp;&amp; gameBoard[row +i+2][col] === "X" ||
  
        gameBoard[row + i][col]==="O" &amp;&amp; gameBoard[row + i - 1][col] === "O" 
        &amp;&amp; gameBoard[row +i-2][col] === "X" &amp;&amp; gameBoard[row +i+1][col] === "X"){
      return true;
     }
    }
   return false;       
  }
  </code></pre>
  
  <p>I am testing this function like so:</p>
  
  <pre><code>if(verticalMatch(x,y)===true){
          console.log('Two O\s between two X\s vertically');
   }
  </code></pre>
  
  <p>When I run this code I keep getting the following error <code>TypeError: Cannot read property '0' of undefined</code>. What could be causing this error, and what does it mean exactly?  </p>