Can't get text to dissapear at the end

My student is trying to get the code “Presents Collected” to go away when the YOU WIN!! shows. Is there a way to do this?

To fix this issue, you have to return the function which only takes one line of code.
Basically what I’m saying is that all you have to do is this.
I have marked it with “^” so that you know I have changed something in the code.

if (PresentsCollected == 3) {
    return Score;
    // ^^^^^^^^
  } else {

This will return everything from the function.
I hope your class does well!

1 Like