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 have used array.filter before. But I just started so would someone please explain this kata and the solution for those new to programming?
I would like to learn something from this but the solutions are not clear to me.
I am sure that link answers my question...somewhere?
Nevertheless, I appreciate the reply. Sorry about posting in the wrong area.
Don't ask kata-related questions here, go to the kata's discourse and ask their plss next time ~~~~
And read this to clarify your doubts ~~
I hope that this is the correct place to ask. If not, I am sorry for the hassle. On the 8 Kyu kata "Sum of positive," you are to get an array of numbers and return the sum of all of the positive ones. I tried this:
function positiveSum(arr) {
return arr.filter(e => e > 0).reduce((a, b) => a + b);
}
It worked using node in VS Code, but in Codewars, I received a TypeError.
Could someone please tell me what I have done wrong?