Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    @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.

  • Custom User Avatar

    Error you're getting is because of input not being an array. Your function should handle that as mentioned in Remarks. You can use console.log to see what input looks like.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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