If you print out messages about what you're doing in the code, you could then read those messages to get an idea of what happened. You'd probably want to start with what the input and output was, consider whether that's indeed wrong and then start looking what happened between those.
Your code doesn't do that. Also, returning inside the loop like that, the code inside it runs only once, because
return
exits the function.If you print out messages about what you're doing in the code, you could then read those messages to get an idea of what happened. You'd probably want to start with what the input and output was, consider whether that's indeed wrong and then start looking what happened between those.
Maybe, but without seeing your code, nobody can tell for sure. Read this: https://docs.codewars.com/training/troubleshooting