How do I nest a function within a function?

Hi all

So the problem seems straight forward, but I just can’t get a function to work within a function and I wonder what I am doing wrong

Here is function 1:

Here is function 1 within function 2:

And here is function 2 within function 3:

As you can see, nesting functions using the class ‘SudokuSolver’, declared at the top of the page, is one of the things I have tried in order to get this to work, but it does not

The current error I have is:
image

Any tips?

Thanks for your time

Jaime

Your project link(s)

solution: https://replit.com/@jaimeggb/boilerplate-project-sudoku-solver

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36

Challenge: Sudoku Solver

Link to the challenge:

Just had to type this. before each function, e.g. function 1 within function 2 became:

this.isRowOkForThisNum(board, row, col, num)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.