Skip to content

Commit a62852e

Browse files
✨ remove transaction id added
1 parent 8529b00 commit a62852e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Expense Tracker/js/script.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,12 @@ function updateValues() {
8383
balance.innerText = `${total}`;
8484
money_plus.innerText = `${income}`;
8585
money_minus.innerText = `${expense}`;
86+
}
87+
// Remove transaction by ID
88+
function removeTransaction(id) {
89+
transactions = transactions.filter(transaction => transaction.id !== id);
90+
91+
updateLocalStorage();
92+
93+
init();
8694
}

0 commit comments

Comments
 (0)