Learn Intermediate OOP by Building a Platformer Game - Step 75

Tell us what’s happening:

Maybe I’ve been going too long and don’t see the issue here? Get the following
You should have a forEach loop that iterates through the platforms array.

Your code so far

if (keys.rightKey.pressed && isCheckpointCollisionDetectionActive) {
      platforms.forEach(platform => {
        platform.position.x -= 5;
      });
    }

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 75

Parenthesis… Though I believe that shouldn’t matter, correct?

2 Likes