using reduce to compose an array of cumulative strings

后端 未结 0 818
清歌不尽
清歌不尽 2020-11-28 05:38

I want to return something like this [\'4\', \'42\',\'420\'] for a given number: 420

I am using reduce to accumulate the number and using the index to concat the numb

相关标签:
回答
  • 消灭零回复
提交回复
热议问题