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.
Please mark your post as having spoiler content next time, read this: https://docs.codewars.com/training/troubleshooting/#expected-the-same
Your function should return its value, there is no
return
there.@iamlimohd mark your post as having spoiler content when posting code like that. Your function returns false in a case it shouldn't, it's an edge case, and even when it says in the description, the result is self-evident you have to think a little about it. Also your code doesn't handle the same multplicity clause.
Error you're getting is because of input not being an array. Your function should handle that as mentioned in
Remarks
. You can useconsole.log
to see what input looks like.Your code is a bit flawed. You can print the inputs to see which case fails. And next time please mark post as having spoiler content if you post code snippets.
Don't forget to mark your posts as having spoiler content (I've done it for you). Delete the other post while you can (no need for two threads about the same problem). Your function should return the result, not print it to the console.
Help us help you, how can we answer that without seeing your code? Mark your post as having spoiler content (the one with the code) and use markdown formatting