I have an empty array inside the object like this,
const account = {
name: "David Reallycool",
expenses: []
}
and I need to create a function to add expense into an empty array, the result I need is,
const account = {
name: "David Reallycool",
expenses: [
{
descrition: "Rent",
amount: 1000
},
{
description: "Coffee",
amount: 2.50
}
]
How can I manipulate it?