+
50
-

js如何克隆对象?

js如何克隆对象?

网友回复

+
0
-

Object.assign可以克隆对象。

var obj={a:1};
var newobk=Object.assign({},obj);

我知道答案,我要回答