So, I have:
const Transaction = {
all: [{
description: 'Luz',
amount: -50000,
date: '23/01/2021',
}, {
description: 'Website',
amount: 056,
date: '23/01/2021',
}, {
description: 'Internet',
amount: -25000,
date: '23/01/2021',
}, {
description: 'App mobile',
amount: 900000,
date: '23/01/2021',
}]
}
Then I print it on console without doing anything before it:
const App = {
init() {
Transaction.all.forEach((transaction) => {
console.log(transaction)
})
}
The output is:
{description: "Luz", amount: -50000, date: "23/01/2021"}
{description: "Website", amount: 46, date: "23/01/2021"}
{description: "Internet", amount: -25000, date: "23/01/2021"}
{description: "App mobile", amount: 900000, date: "23/01/2021"}
Why Website amount(declared as 056) became 46??