I understand that it will be fast, but in the demo posted i was able to beat the game with simple cheat.
If this game were to be developed any further that the JavaScript should only be used for sending requests to the server, then get PHP (or something similar) to do the rest.