title: SyntaxError for functions in strict mode
body: <p>I am working on the following code and get this error after the renderBoard function. It looks like once the browser gets to the resetGame function is throws up this error. I don't fully understand why.</p>
  
  <p><strong>SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function.</strong></p>
  
  <pre><code>function renderBoard() { 
  
  
  var topRow = [$("0_0"), $("0_1"), $("0_2")];
      var middleRow = [$("1_0"), $("1_1"), $("1_2")];
      var bottomRow = [$("2_0"), $("2_1"), $("2_2")];for (var row = 0; row &lt; 3; row++) {
     `enter code here` for(col = 0; col &lt; 3; col++){
  
    var eltId = row + "_" + col;
  
  
          eltId = "0_" + col;//Why do you have to add the "0_" It goes row and column. Row O column 0. Row O column 1 Row 0 Column 3 
          if (topRow[col] == BLANK) {
                  $(eltId).src = BLANK;
              }
              else if (topRow[col] == PLAYER_X) {
                  $(eltId).src = PLAYER_X;
              } 
              else if (topRow[col] == PLAYER_O) {
                  $(eltId).src = PLAYER_O;
              }
       }
  
      // middle row:
    for (var row = 0; row &lt; 3; row++) {
      for(col = 0; col &lt; 3; col++){
          eltId = "1_" + col;
          if (middleRow[col] == BLANK) {
  
                  $(eltId).src = BLANK;
              }
              else if (middleRow[col] == PLAYER_X) {
                 $(eltId).src = PLAYER_X;
              } 
              else if (middleRow[col] == PLAYER_O) {
                  $(eltId).src = PLAYER_O;
              }
       }
  
      // bottom row:  
     for (var row = 0; row &lt; 3; row++) {
      for(col = 0; col &lt; 3; col++){
      {
          eltId = "2_" + col; //adds row number to column number eg. 2_0, 2_1, 2_2
          if (bottomRow[col] == BLANK) {
  
                  $(eltId).src = BLANK;
              }
              else if (bottomRow[col] == PLAYER_X) {
                  $(eltId).src = PLAYER_X;
              } 
              else if (bottomRow[col] == PLAYER_O) {
                  $(eltId).src = PLAYER_O;
              }
       }
  }
  
  
  
  function resetGame(){
       `enter code here`var topRow = //added var to decalaration
       [BLANK,BLANK,BLANK];
       var middleRow = 
       [BLANK,BLANK,BLANK];
       var bottomRow =
       [BLANK,BLANK,BLANK];
  
      gameInProgress = true;
      updateDisplay();
      renderBoard();
  
  }
  </code></pre>