Skip to content

Basic JavaScript exercises - Currency converter, grade calculator, inventory management, and mathematical problem solving practice.

Notifications You must be signed in to change notification settings

CharlyIslami/javascript-basic-exercises-

Repository files navigation

JavaScript Basic Exercises

A collection of basic JavaScript exercises covering fundamental programming concepts and mathematical calculations.

📋 Exercise List

1. Currency Converter (Sinta Dollar)

  • File: sintadolar.html, sintadolar.js
  • Description: Convert USD to IDR with exchange rate calculation
  • Concept: Basic arithmetic, DOM manipulation

2. Grade Calculator (Rata-rata Siswa)

  • File: rata-rataswa.html, rata-rataswa.js
  • Description: Calculate average grades from multiple subjects
  • Concept: Array processing, mathematical operations

3. Fruit Inventory (Toko Buah)

  • File: tokobuah.html, tokobuah.js
  • Description: Manage fruit inventory with distribution calculation
  • Concept: Division, remainder operations, logical thinking

4. Travel Time Calculator

  • File: waktutempuh.html, waktutempuh.js
  • Description: Calculate travel time based on distance and speed
  • Concept: Time calculation, unit conversion

5. Discount Calculator (Rina Shopping)

  • File: rinabaju.html, rinabaju.js
  • Description: Calculate final price after discount
  • Concept: Percentage calculation, price computation

🚀 How to Run

  1. Clone this repository:

    git clone https://github.com/CharlyIslami/javascript-basic-exercises.git
  2. Navigate to the project directory:

    cd javascript-basic-exercises
  3. Open any HTML file in your browser:

    # Example
    open sintadolar.html

💻 Technologies Used

  • HTML5 - Structure and layout
  • Vanilla JavaScript - Logic and functionality

📚 Learning Objectives

  • Basic JavaScript syntax and operations
  • DOM manipulation and event handling
  • Mathematical calculations and problem solving
  • User input validation and processing
  • Clean code practices

🎯 Skills Practiced

  • Variables and data types
  • Functions and return values
  • Conditional statements
  • Mathematical operations
  • HTML form handling
  • JavaScript event listeners

📝 Notes

These exercises are designed for beginners to practice fundamental JavaScript concepts. Each exercise focuses on real-world problem solving scenarios.

📄 License

This project is open source and available under the MIT License.


Created with ❤️ for learning JavaScript fundamentals

About

Basic JavaScript exercises - Currency converter, grade calculator, inventory management, and mathematical problem solving practice.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published