how to split a string by chunks of 2 characters using reduce

后端 未结 0 351
滥情空心
滥情空心 2020-12-03 03:44

i am trying to use reduce to get the following output: solution(\'abcdef\') // should return [\'ab\', \'cd\', \'ef\']; if the length of the string is odd we should convert

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