Hot answers tagged

2

Review Your code is a good simple solution. The style is sloppy. The complexity is a bit high and the techniques uses are negatively impacting performance. The template literal call Array.split`+` always throws me, but I like it, your code reminds me to use it more often. General points Delimit all code blocks. Eg if(n==0) return ["0"] better ...


1

Your code does not perform very well, I suppose because of the double recursion within the f-method. It lacks readability: let's say you return to this code a year later: how long would it take to understand what you actually wanted to do? Always use strict equality comparison (n == 0 => n === 0). Readability can at least be enhanced by interpunction, ...


Only top voted, non community-wiki answers of a minimum length are eligible