js中拷贝方法

一种是eval(uneval(x)) == deep_copy_of_x . The actual method uneval(_obj_) is a Spidermonkey specific (as of 1.7) extension that is not part of ECMAScript. 

另一种則是 for(i in..) traverse the properties and copy each of them.

你可能感兴趣的:(js)