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.
This comment is hidden because it contains spoiler information about the solution
Has anyone run into an issue where the first test always works but every test after returns "NaN"? Its like its storing a value from the previous test run somewhere in my function.
My code works in other environments but I get this error in codewars
expected { pos: [2,3], peaks: [3,2] } to deeply equal { pos: [2], peaks [3] }
I don't even know what test this is. Any ideas?
Can you explain how you brought an array into the function without 'let arr = []'?