Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I guess the author of the comment already knows, but let it stay for new people.
for a person who does not know what this code is for, he has no idea what the number 40 is.
in this case, the constant is used for two reasons in bussines case,
1 instead of a comment,
2 if you update the price list, you change it in one place, not in several.
the same if 'd' was 'days' a new person immediately knows what the code is for.
I also forgot about destructuring as well. However, it does work without destructuring. I think you forgot to initialize your accumulator. You need to add the
,0
after the function to initialize the accumulator. Hope that helps!Write code correctly and then better.
This comment is hidden because it contains spoiler information about the solution
Not an issue. The expected result is
12
.