0
点赞
收藏
分享

微信扫一扫

数组赋值不改变原数组

独兜曲 2022-02-16 阅读 52

实现多维数组的深拷贝可以用:

let newArr = []

newArr=JSON.parse(JSON.stringify(arr))

举报

相关推荐

0 条评论