Visit site: http://lisalhilton.com/cryptofun/ourpuzzles.html
To solve the problem, I stop the scramble just before the last letter and, if it’s the same letter, swap it with a different letter instead.
Possible next steps: While the code works, I’d like to keep looking for a more elegant solution in order to scramble the alphabet. This might be easier to do in PHP or utilizing jQuery. I’d like to also improve moving among the letters a little better, perhaps having a user-selectable option to skip letters that you’ve already entered when you put in a letter. It might also be good to add some user tracking to make sure that a user doesn’t get the same puzzle in a session, to track the number of puzzles completed, hints used, and other statistics.