最直覺的想法,就是iterate object keys,把對應的值指到目標 object 。 function clone(from = {}) { const to = {}; for (let key in from) { to[key] = from ...
確定! 回上一頁