Solve simple word ladder puzzles in JavaScript.