📌  相关文章
📜  如何在对象中添加键值对 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:46.907000             🧑  作者: Mango

代码示例3
// program to add a key/value pair to an object

const person = {
    name: 'Monica',
    age: 22,
    gender: 'female'
}

// add a key/value pair
person.height = 5.4;

console.log(person);