JavaScript puzzle.