微信小程序中,数组的深拷贝 function copyArr(oldArr){ let newArr = []; newArr = JSON.parse(JSON.stringify(oldArr)); return newArr; }