Learn Intermediate OOP by Building a Platformer Game - Step 103

Tell us what’s happening:

According to the instructions, I have to create call a setTimeout() method that sets the display property to none. I have added the callback function that sets the checkpointScreen.style.display to “none”. I have tried different combinations of parenthesis just in case it was a problem with some parser but no luck. Can you help me identify what am I missing?

Your code so far

const showCheckpointScreen = (msg) => {
  checkpointScreen.style.display = "block";
  checkpointMessage.textContent = msg;
  if(isCheckpointCollisionDetectionActive) {
    setTimeout(() => { checkpointScreen.style.display = "none"; }, 2000);
  }
};

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/115.0

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 103

It looks like the tests are to strict here.
Replace the curly braces with parenthesis and it will pass

Also, remove the semicolon

1 Like

It worked! Thank you!

1 Like

Glad it worked out

I also added an issue to make the tests less strict

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