Sudoku Solver in JavaScript