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.
Better but still not right, you're misusing the method inside your if condition. That's all the help I can give you without solving it for you, check how to use it in MDN or some other place.
No, you don't. Read this: https://docs.codewars.com/training/troubleshooting/#works-but-no
You're printing the right result to the console, but your function should return it, not print it.
Read about the methods you want to use, you're using it wrong too.