jQuery turns in a game

I have this javascript code in my html that i was making for fun.
My problem is that i cannot stop the game after a set of turns. I want it to stop and tell the user the answer to my game and then make the user reload the game but i cannot…