Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.19 KB

README.md

File metadata and controls

32 lines (25 loc) · 1.19 KB

Money Management Program

This JavaScript application manages the balance of an account by allowing users to deposit money, withdraw money, or exit the program. It continuously displays the current balance and provides options to the user until they choose to exit.

Features

  • Display Balance: Shows the current balance of the account.
  • Deposit Money: Allows the user to add a specified amount to the account balance.
  • Withdraw Money: Allows the user to subtract a specified amount from the account balance, with a check to ensure sufficient funds.
  • Exit Program: Ends the program when the user chooses to exit.

How to Run

To run this JavaScript exercise, follow these steps:

  1. Save the JavaScript Code:

    • Copy the JavaScript code into a file named index.js.
  2. Create an HTML File:

    • Create an index.html file and include the JavaScript file within a <script> tag:
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Money Management</title>
    </head>
    <body>
        <script src="moneyManagement.js"></script>
    </body>
    </html>