The best thing about this kata is it provides this nice little detail:
"Tested values are all between 0 and 100. Theres is no need to check for negative values or values greater than 100."
So many katas on this site are missing these very useful parameter descriptions.
Is this better though? I'd wonder if it's faster or slower?
And it exists in many programming languages and not just JS.
This comment is hidden because it contains spoiler information about the solution
If you initialize your reducer to 0 you don't need to check the array length.
Loading collection data...
The best thing about this kata is it provides this nice little detail:
"Tested values are all between 0 and 100. Theres is no need to check for negative values or values greater than 100."
So many katas on this site are missing these very useful parameter descriptions.
Is this better though? I'd wonder if it's faster or slower?
And it exists in many programming languages and not just JS.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
If you initialize your reducer to 0 you don't need to check the array length.