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.
That's true. However this solution is really old, probably written before var became depricated.
It is better not to use var and replace it with let or const, but in this case let. It is better not to use var at all
What about number which is a string? ( ͡° ͜ʖ ͡°)
Every language that is not C or Brainfuck has this function.
HAHA kinda feels unfair using python, purpose of this is to be able to develop the built in function or something like it hence improving our problem solving.
Please use appropriate formatting when posting code (code blocks)!
You would have higher chance of getting help if you asked concrete questions and showed more initiative, and not just "fix my code for me".
Debug your solution and try to understand what is going wrong yourself. Debugging is an essential skill in programming and by asking other people to do it you're doing a disservice to yourself. Maybe this can help: https://docs.codewars.com/training/troubleshooting
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Please use the spoiler flag when posting potential spoilers and use appropriate formatting when posting code. See: https://docs.codewars.com/training/troubleshooting#post-discourse
Your code doesn't do what the kata asks at all, so I'm not sure what you mean by "correct".
You need to be able to handle any function, not just the 4 you hardcoded. The functions are also passed in as functions, not as strings.
This comment is hidden because it contains spoiler information about the solution