利用 javascript 複製物件

產生新物件(深層複製)
JSON.parse(JSON.stringify(xxx))

覆蓋屬性值(淺層複製)
Object.assign(target,source)

留言

熱門文章