arr=[1,2,3,4,2,1,2]
    delete arr[2]
    console.log(arr)
    arr.splice(2,1)
    console.log(arr)
delete 返回长度不变,splice返回长度发生变化

相关文章:

  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2021-11-08
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 1970-01-01
  • 2022-01-25
  • 2022-03-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案