Update sudoku.js

1. Fix a bug: some cases it fails to print out "success" when it completes.
2. change error message
3. add comments