Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

美团篇>实现数组和对象的深拷贝 #60

Open
lixingjuan opened this issue Oct 24, 2019 · 1 comment
Open

美团篇>实现数组和对象的深拷贝 #60

lixingjuan opened this issue Oct 24, 2019 · 1 comment

Comments

@lixingjuan
Copy link

可以使用JSON.parse(JSON.stringify(arr1)) 实现数组和对象的深拷贝

const arr1 = {
  a:1,
  b:[{name:1}],
  c:{age:1}
}
@wangbojing
Copy link
Member

可以贡献到master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants