Javascript Sudoku solver