How do I maintain original values for the first two cards while printing out the third?

If new card is clicked I want to print out the all three cards in the cards paragraph. But this current code resets the first and second card if newCard() is called. I tried moving the first two lines of the startGame outside the function and put them at the top with “var” instead of “let” but then I got “NaN”.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.