var obj={‘one‘:1,‘two‘:2} for(let key in obj){ obj[key] = ‘‘ } console.log(obj) //{‘one‘:‘‘,‘two‘:‘‘}
JS 清空对象的值
原文:https://www.cnblogs.com/llive/p/13953300.html