title: JavaScript Recursive function return undefined instead of an array
body: <p>I have the next function:</p>
  
  <pre><code>function solveSudoku(prev_tab, fila, columna) {
  
    let tab = _.cloneDeep(prev_tab);
    let sig_fila = fila;
    let sig_col = columna;
  
    if (fila === 8 &amp;&amp; columna === 8) {
      //console.log(tab);
      return tab;
    }
  
    if (columna === 8) {
      sig_col = 0;
      sig_fila = sig_fila + 1
    } else {
      sig_col = sig_col + 1;
    }
  
    if ((tab[fila][columna]) !== '') {
      solveSudoku(tab, sig_fila, sig_col)
    } else {
      for (let num = 1; num &lt;= 9; num++) {
        if (numeroValido(tab, num, fila, columna)) {
          tab[fila][columna] = num;
          //tab.toString();
          solveSudoku(tab, sig_fila, sig_col)
        }
      }
    }
  }
  </code></pre>
  
  <p>it returns undefined instead of a 2D array, i already try to add return in every recursive call =></p>
  
  <pre><code>return solveSudoku( tab, sig_fila, sig_col )
  </code></pre>
  
  <p>but now that doesn't work either</p>