Pure JavaScript Sudoku generator/solver

Several years ago I already showed you a Sudoku generator/solver using PHP and another using AS3, today I am showing you the JavaScript version because I am going to create a visual Sudoku game using some popular frameworks.

Here it is what you are going to get:

You can start with an empty Sudoku, so it will generate a random one, or populate sudoku array to have it solved.

Here is the source code:

That was easy, but things will get interesting when I’ll show you this engine in a game, meanwhile download the source code.

  • i need help to get code for 6×6 sudoko in javascript using inside html………..As i am not from computer science….i face a lot of difficulty in coding…..but i want to know this………so plz help…………

  • Tom

    Thanks dude, I was digging into Internet for such an algorithm in JS, needed for a JQuery base sudoku game.