I don't like this solution at all. It doesn't work out the actual problem, it uses inside knowledge instead that might break in the future.
Love the descriptive argument names!
This comment is hidden because it contains spoiler information about the solution
Don't we have to surround exprssion inside join() with square brackets since it is a list comprehension? Isn't it an error?
Can someone explain to me why you need to add 0 as a second argument in the reduce () function?
I have you know. I'm a expert python developer. I created everything is computer. Including people. And having a global variable will stay in memory causing your application to use memory. While having the variable in function will allow the application to flush out the memory being used for variables.
I love this solution. It's the kind of solution that immediately teaches you different ways you can combine your tools. I didn't even realize to just wrap the num in a template literal instead of putting it through ".toString()". I also did not realize from what others mentioned below, how you could just spread that out directly into brackets to skip adding ".split('')" as well.
Awesome work, and a better use of recursion than I came up with too.
I don't see an option to delete my comment. After submitting this comment, it occured to me that I had misattributed the outcome of a nested function to its parent function, leading to an unfounded "logical leap". Disregard my original question, parent commenter.
Yes, you must be right. Thanks for your feedback.
i is a counter and is used to add the lowercase letters.
You can multiply a string: 'string' * 2 = 'stringstring'.
Why does this need a quote as the second argument in the .replace method? It seems to read as though if there is somethign that matches then you'll get emptiness. Why am I not reading this correctly?
You've spent more time writing that than we've thought about the problem.
Performance is a mechanic to consider for your task, and in this context when our goal is to solve a self contained problem with implied constraints, if it's fast enough to pass the test cases, it's the best practice.
Is refactoring are the bugfix?
Or it's the different points?
I tried this but it wasn't accepted. I tried a couple others that seem to be in here, but they also weren't accepted. I kept failing at least 1 test: 0 return undefined instead of 0.