深拷贝数组(对象)

auroraQ / 2023-08-08 / 原文

1、深拷贝数组  a = Array.from(b)

2、深拷贝对象  a=JSON.parse(JSON.stringify(b))