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.
👏
Thank you very much!
Sorry, but it seems I don't understand what you're talking about. (I'm very new to programming). I debug code by running it in VSC and looking in the terminal to see what different sections of code return. At the end of the story, I run the resulting function, offering it various variables (including from sample tests from the author of kata at CodeWars).
Please explain, what do you mean by "printing the input".
Here?
When testing code on CodeWars I get: "TypeError: Cannot read property '0' of undefined". At the same time, VSC does not see errors in my code and testing the function on various strings, I get the correct result.
How could I figure out what the test swears at?
Thank you. But at 1st comment I've just copied the output.
I've added a check for the incoming array to see if it was empty. (Like this: "if (...arr.length !== 0)"). And yes: the result of the test before I added this check was the same.
This comment is hidden because it contains spoiler information about the solution
What in this solution excludes negative variable values?
You're right. I didn't read the task carefully. So sorry. :(
Thank you!
But I get the required output with one function instead of two? It seems to be not wrong but better solution, isnt' it?
The problem is that kata requires to obtain count for both.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
:))))))) GREAT!
Loading more items...