/calculator

Primary LanguageJavaScriptMIT LicenseMIT

JavaScript Calculator

This project is a web-based calculator designed for learning purposes as part of The Odin Project's curriculum. It demonstrates several key programming concepts:

Key Concepts

1. JavaScript Functionality

  • Functions for basic arithmetic operations (addition, subtraction, multiplication, division) are defined.
  • Event listeners capture user input and trigger corresponding actions.

2. Handling User Input

  • Decimal numbers are supported, and input validation prevents multiple decimal points.

3. Displaying Results

  • Real-time display of the current operation and the calculated result is implemented.

4. Clearing and Undoing Actions

  • Buttons for "AC" (clear) and "CE" (undo) allow users to manage their input.

Usage

  • Open the index.html file in a web browser or access it here.