📜  在js中填充对象的所有字段 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:30.359000             🧑  作者: Mango

代码示例1
let obj = new obj()

Object.keys(obj).forEach(field => obj[field] = 'value');
// fill all fields of obj with 'value'