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.
Your code is not correctly formated so it's hard to see what it does actually. Please see here how to format code: https://docs.codewars.com/references/markdown/#code-block
Maybe your variable is not properly declared. See here: https://www.w3schools.com/js/js_variables.asp
If you really know nothing about programming it'll be hard to teach you all. You need to search online with the error messages you get. The whole documentation of JavaScript is available online.
I advice you to also read this: https://docs.codewars.com/training/troubleshooting/
Hi. You return the result immediately, after parsing the first two elements. You must
return
only after the loop has been completed.