【问题标题】:Split array into smaller arrays separated by ''将数组拆分为更小的数组,以 \'\' 分隔
【发布时间】:2022-12-02 18:52:30
【问题描述】:

How to split an array into smaller arrays separated by \"\"?

I have an array which looks like this:


`[
  \'1000\', \'2000\',  \'3000\',
  \'\',     \'4000\',  \'\',
  \'5000\', \'6000\',  \'\',
  \'7000\', \'8000\',  \'9000\',
  \'\',     \'10000\'
]
`

I need arrays which would look like this:


`  [\'1000\', \'2000\',  \'3000\',]
  [ \'4000\'] 
  [\'5000\', \'6000\' ]
  [\'7000\', \'8000\',  \'9000\']
  [ \'10000\']
`

Any help is useful

  • Do not know why get so many downvote!

标签: javascript arrays


【解决方案1】:
猜你喜欢
  • 2022-07-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-05
相关资源
最近更新 更多