This is a simple and intuitive Expense Tracker application built with React. The app allows you to keep track of your income and expenses, giving you a clear picture of your financial status. You can add your earnings and expenses, and the app will calculate your total balance, total income, and total expenses.
Follow these steps to set up and run the project locally:
Create a new React app:
Open Git Bash and run the following command to create a new React app:
npx create-react-app expense-tracker-react
Navigate to the project directory:
cd expense-tracker-react
Open the project in VS Code:
code .
Start the development server:
Once you're inside your project directory, start the React development server:
npm start
In this project, the following JavaScript Math
methods are utilized:
Math.abs(): The Math.abs()
function returns the absolute value of a number. This is used to convert any negative expense value into a positive number, ensuring that the calculations are correct.
const expense = Math.abs(-100); // returns 100
Math.floor(): The Math.floor()
function rounds down a number to its nearest integer. This is useful when dealing with decimal values and you want to ensure that the displayed values are whole numbers.
const roundedIncome = Math.floor(1234.56); // returns 1234
This project is licensed under the MIT License - see the LICENSE file for details.