Fix tests for step 43 of shopping cart project #54598
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.
Describe the Issue
When working through the Shopping Cart Step 43, it's expected from the user to create a
calculateTotal()
method that internally uses areduce()
to make a sum, like the following:But when presented the following solution, making the reduce's callback sum the other way around, it doesn't pass:
Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-oop-by-building-a-shopping-cart/step-43
Your code
Expected behavior
Because of the Commutative property of addition, the previous presented solution should work.
Screenshots
No response
System
Additional context
No response
The text was updated successfully, but these errors were encountered: