Skip to content

14 JS中的引用与复制 #41

@imnaifu

Description

@imnaifu

Refer to your words

最后需要注意的是:在前面的例子里面,我们用的数组和对象都只是一层嵌套,Lodash 有一个深度复制的方法,但你使用之前需要多考虑一下。

Actually, the JSON parse and stringify method, const dev2 = JSON.parse(JSON.stringify(wes));
is a kind of deep copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions