Key Features of this Tool:
Persistent Storage: It uses
window.localStorageto save your data. If you close the browser and come back, your history and balance remain intact.Color-Coded Logic: Expenses (negative numbers) are automatically flagged with a red border, while income (positive numbers) gets a green border.
Real-Time Math: The
updateValues()function recalculates the sub-totals for Income, Expenses, and the final Balance every time a transaction is added or removed.Responsive UI: The container is restricted to a mobile-friendly width but expands gracefully on larger screens.
Potential Enhancements:
Category Filter: You could add a dropdown (Food, Rent, Salary) to group your expenses.
Date Stamping: Add a date to the transaction object so you can see when you spent the money.
Charts: Use a library like Chart.js to turn this data into a visual pie chart or bar graph.
Would you like me to show you how to integrate a Pie Chart to visualize these expenses?
ExpenseFlow
YOUR BALANCE
$0.00
INCOME
+$0.00
EXPENSE
-$0.00