My app is basically an increment and decrement of numbers where you tap buttons
A beginner-friendly JavaScript project that lets you increase, decrease, and reset a number with a clean and modern interface. Built with HTML, CSS, and vanilla JavaScript, itβs perfect for learning DOM manipulation and event handling.
β¨ Features
πΌ Increase / Decrease buttons to adjust the counter
π Reset button to return to zero
π¨ Dynamic color changes (green for positive, red for negative)
π» Built using pure JavaScript (no frameworks required)
π± Responsive design that works on both desktop and mobile
π How to Run
Download or clone the repository
Open the index.html file in your browser
Click the buttons to interact with the counter
π§ What Youβll Learn
DOM selection (getElementById)
Event listeners (addEventListener)
Dynamic style and text updates
Basic project structure and Git/GitHub usage
π License
This project is open-source under the MIT License β feel free to use, modify, and share it.
his project was built using only three core web technologies:
HTML for the structure of the page
CSS for styling and layout
JavaScript for functionality and interactivity
ποΈ Step-by-Step Breakdown
Created the HTML file (index.html)
Added a title, a heading, and three buttons: Increase, Decrease, and Reset.
Added a <div> to display the counter value.
Linked the JavaScript file at the bottom of the page with:
<script src="script.js"></script>Styled it using inline CSS inside the <style> tag
Used Flexbox to center everything in the middle of the page.
Added a soft gradient background for a clean, modern look.
Styled the buttons with hover effects and rounded corners.
Wrote the logic in JavaScript (script.js)
Created a variable count to hold the current number.
Used document.getElementById() to get the buttons and counter display.
Added event listeners for button clicks:
Increase β adds +1 to the count.
Decrease β subtracts 1 from the count.
Reset β sets the count back to 0.
Updated the display text and changed its color dynamically (green if positive, red if negative, black if zero).
Tested the app in a browser
Opened index.html directly in Chrome.
Clicked the buttons to make sure everything worked smoothly.
π§© Tools Used
ποΈ VS Code β for writing and editing code
π Google Chrome β for testing and previewing
π§ Vanilla JavaScript β no external libraries or frameworks

