Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let food = {id: 1, $key: 'sasaasas1212', cartItem: {}, name: 'asdsa', price: 232}
- let {$key, cartItem, ...object2 } = food;
- let cartItem1 = {...object2, quantity: 2, total: 1221};
- document.write(cartItem1.name);
Add Comment
Please, Sign In to add comment