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.
A bit late, but... Could you please reformat it with starting and ending triple backticks, then tell us the relevant error message?
Wasn't anyway using
Math.max()
for maxLength or directly return eithertrue
/false
or a better way of handling things?P.S.: cool Latin nick.
Your functions are changing the
values
array. It wasn't originally[11, 12]
- yourminimumSum
function changed it.Try logging
values
before and after calling your functions to see that it's being changed within your function:Javascript passes arrays and objects by reference, so if your code changes the array, it can have unintended side effects. Always try to avoid changing objects and arrays that were passed as arguments. If you need to modify them, make a copy first and modify that.
Hi,
If you try to run an test of your own with the following values, what do you get as an answer?