Skip to content

Commit

Permalink
made history objects
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyHubert committed Jul 31, 2024
1 parent c385641 commit cb50b06
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions yoseph/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ document.querySelector(`#savings-expense-enter`).addEventListener(`click`, () =>
Savings = Savings - SavingsSubtract
document.querySelector(`#savings-total`).innerHTML = Savings
document.querySelector(`#savings-expense-amount`).value = ''
History.push(document.querySelector(`#savings-expense-description`).value)
const savingsHistoryItem = {
description: document.querySelector(`#savings-expense-description`).value,
amount: SavingsSubtract,
}
History.push(savingsHistoryItem)
document.querySelector(`#savings-expense-description`).value = ''
})

Expand All @@ -67,7 +71,11 @@ document.querySelector(`#stupid-expense-enter`).addEventListener(`click`, () =>
Stupid = Stupid - StupidSubtract
document.querySelector(`#stupid-total`).innerHTML = Stupid
document.querySelector(`#stupid-expense-amount`).value = ''
History.push(document.querySelector(`#stupid-expense-description`).value)
const stupidHistoryItem = {
description: document.querySelector(`#stupid-expense-description`).value,
amount: StupidSubtract,
}
History.push(stupidHistoryItem)
document.querySelector(`#stupid-expense-description`).value = ''
})

Expand Down

0 comments on commit cb50b06

Please sign in to comment.