Learn Intermediate OOP by Building a Platformer Game - Step 79

Tell us what’s happening:

It keeps telling me that I do not have a forEach loop but i do this is the message it gives me “You should have a forEach loop that iterates through the platforms array.”

Your code so far

      platforms.forEach(platform=> platform.x -= 5);
    }

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 79

1 Like

you need to substract from the position, the platform doesn’t have a x property directly, it has something nested tho

3 Likes

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