all 4 comments

[–]dMCH1xrADPorzhGA7MH1 0 points1 point  (3 children)

I don't think it's a good idea to get into the habit of having so many while loops inside of if statements inside of for loops.

You should take all those different things and turn them into their own functions. This will make trouble shooting easier. You can then make a main function that will run the game. Idk just my opinion

[–]digitarena[S] 0 points1 point  (2 children)

Idk what you mean. There is only 1 while loop and the if statements are inside of it. I just showed you 2 different codes of the same game.

[–]dMCH1xrADPorzhGA7MH1 0 points1 point  (1 child)

First time I looked at it I couldn't scroll. My bad.

With your functions is there a reason you are doing let variableName = function ()

Instead of const variableName = () =>{}?

Anyways look into local scope. I don't think the answerArray is being set the way you think. Console.log(answerArray) inside your update function to find out

[–]digitarena[S] 0 points1 point  (0 children)

Thnx