lodash.compact What are the performance benefits of writing?

前端 未结 0 1630
醉话见心
醉话见心 2021-01-21 04:18

source

function compact(array) {
  let resIndex = 0
  const result = []

  if (array == null) {
    return result
  }

  for (const value of array) {
    if (valu         


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