📜  js在对象中添加数据 - Javascript代码示例

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

代码示例1
var element = {}, cart = [];
element.id = id;
element.quantity = quantity;
cart.push(element);