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

All tests for the for...of loop in the Dice game should allow campers to use let or const #54065

Closed
jdwilkin4 opened this issue Mar 13, 2024 · 1 comment · Fixed by #54066
Closed
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

@jdwilkin4
Copy link
Contributor

jdwilkin4 commented Mar 13, 2024

Describe the Issue

We had this issue on the forum where the camper was unable to pass the test for step 71 with the following code.
https://forum.freecodecamp.org/t/learn-intermediate-algorithmic-thinking-by-building-a-dice-game-step-71/679051

for(let num of arr){
  
}

The test is expecting the use of const inside the loop. But let is valid too.

After a quick scan of the final solution, it looks like the for...of loop is used four times.
I have checked the tests, but it is possible that all 4 instances have the same issue where const is expected.
Update all 4 instances of the for...of tests to accept the use of let or const

Affected Page

multiple pages

Your code

see explanation above

Expected behavior

see explanation above

Screenshots

No response

System

  • Device: [e.g. iPhone 6, Laptop]
  • OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 22]

Additional context

No response

@jdwilkin4 jdwilkin4 added type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. help wanted Open for all. You do not need permission to work on these. scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. new javascript course These are for issues dealing with the new JS curriculum labels Mar 13, 2024
@jdwilkin4 jdwilkin4 changed the title All tests for the for...of loop should allow campers to use let or const All tests for the for...of loop in the Dice game should allow campers to use let or const Mar 13, 2024
@PrajvalaRC
Copy link
Contributor

I verified other for loops at step 35, 38 and 57. All these accepts the use of let or const or var.

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
2 participants