// Create an object literal called personAccount. It has firstName, lastName, incomes, expenses properties and it has totalIncome, totalExpense, accountInfo,addIncome, addExpense and accountBalance methods. Incomes is a set of incomes and its description and expenses is a set of incomes and its description.
// Create an object literal called personAccount. It has firstName, lastName, incomes, expenses properties and it has totalIncome, totalExpense, accountInfo,addIncome, addExpense and accountBalance methods. Incomes is a set of incomes and its description and expenses is a set of incomes and its description.
// const personAccount = {
constpersonAccount={
// firstName: 'fitsum',
firstName: 'fitsum',
// lastName: 'helina'
lastName:'helina',
// incomes: [
incomes: [
// { description: 'Salary', amount: 50000 },
{ description: 'Salary', amount: 50000 },
// { description: 'Bonus', amount: 10000 },
{ description: 'Bonus', amount: 10000 },
// ],
],
// expenses: [
expenses: [
// { description: 'Rent', amount: 10000 },
{ description: 'Rent', amount: 10000 },
// { description: 'Groceries', amount: 5000 },
{ description: 'Groceries', amount: 5000 },
// ],
],
// totalIncome() {
totalIncome() {
// return this.incomes.reduce((total, income) => total + income.amount, 0);