Thanks for the jsbench link, seems to be a very usefuly online tool, I will save that.
And about the different solution with toString conversion, yes, why not, if you prefer type conversion and the map method. They are definitely many solutions to the same problem.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Wouldnt it be easier to convert the number to a string and just split it? Performance-wise it doesnt make much difference.
benchmark: jsben.ch/67w9k
Thanks for the jsbench link, seems to be a very usefuly online tool, I will save that.
And about the different solution with toString conversion, yes, why not, if you prefer type conversion and the map method. They are definitely many solutions to the same problem.