Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Step 79 & 80 of Building a Platformer Game #54540

Closed
katereverie opened this issue Apr 26, 2024 · 1 comment · Fixed by #54548
Closed

Update Step 79 & 80 of Building a Platformer Game #54540

katereverie opened this issue Apr 26, 2024 · 1 comment · Fixed by #54548
Labels
help wanted Open for all. You do not need permission to work on these. new javascript course These are for issues dealing with the new JS curriculum scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@katereverie
Copy link
Contributor

katereverie commented Apr 26, 2024

Describe the Issue

Implicitly returning the callback passed into .forEach() won't pass the test.

Affected Page

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-intermediate-oop-by-building-a-platformer-game/step-79

Your code

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

Expected behavior

This should pass at least for this step, and the following step as well.
I found out later that curly brackets are missed here.
The hint/error message is also not helpful here because the code provided above does exactly what the hint asks campers to do.
I suggest adding "Please use curly brackets for the callback for this step" or modifying the corresponding test.

Screenshots

Screenshot 2024-04-26 at 08-14-22 freeCodeCamp org

System

  • Device: Laptop
  • OS: Windows 11
  • Browser: FireFox
  • Version: 125.0.2 (64-bit)

Additional context

No response

@katereverie katereverie added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. labels Apr 26, 2024
@katereverie katereverie changed the title Update Step 79 of Building a Platformer Game Update Step 79 & 80 of Building a Platformer Game Apr 26, 2024
@gikf gikf added the new javascript course These are for issues dealing with the new JS curriculum label Apr 26, 2024
@naomi-lgbt
Copy link
Member

Yes, these two steps should be updated to allow for implicit returns.

@naomi-lgbt naomi-lgbt added help wanted Open for all. You do not need permission to work on these. and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these. new javascript course These are for issues dealing with the new JS curriculum scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants