An attempt at solving a sudoku puzzle with JavaScript