-
Notifications
You must be signed in to change notification settings - Fork 10
add a new js project #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds a new Counter Application project to the JavaScript projects collection. The app allows users to increment, decrement, and reset a counter value with customizable step amounts.
- Adds a complete counter app with HTML structure, CSS styling, and JavaScript functionality
- Implements DOM manipulation and event handling for counter operations
- Includes documentation and project structure in the main README
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Readme.md | Adds project entry to the main README with description |
| 30-counter-app/index.html | HTML structure for the counter app interface |
| 30-counter-app/style.css | CSS styling for responsive UI design |
| 30-counter-app/script.js | JavaScript logic for counter operations |
| 30-counter-app/readme.md | Project-specific documentation and setup instructions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| outputValue.innerText = resultValue - userInputValue; | ||
| }); | ||
|
|
||
| increaseButton.addEventListener('click', () => { | ||
| const resultValue = parseInt(outputValue.innerText); | ||
| const userInputValue = parseInt(userInput.value); | ||
| outputValue.innerText = resultValue + userInputValue; |
Copilot
AI
Oct 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parseInt() can return NaN if the input is invalid. This could cause the counter to display NaN. Consider using parseInt() with a fallback value or validate the input first.
| outputValue.innerText = resultValue - userInputValue; | |
| }); | |
| increaseButton.addEventListener('click', () => { | |
| const resultValue = parseInt(outputValue.innerText); | |
| const userInputValue = parseInt(userInput.value); | |
| outputValue.innerText = resultValue + userInputValue; | |
| outputValue.innerText = resultValue - (isNaN(userInputValue) ? 1 : userInputValue); | |
| }); | |
| increaseButton.addEventListener('click', () => { | |
| const resultValue = parseInt(outputValue.innerText); | |
| const userInputValue = parseInt(userInput.value); | |
| outputValue.innerText = resultValue + (isNaN(userInputValue) ? 1 : userInputValue); |
| ```bash | ||
| git clone https://github.com/your-username/counter-app.git | ||
| ```` | ||
|
|
Copilot
AI
Oct 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect markdown code block closing. Should use three backticks instead of four.
|
Hi sir |
🧮 Counter App – Pull Request Description
This pull request adds a simple Counter Application built using HTML, CSS, and JavaScript.
The app allows users to increment, decrement, and reset the counter value dynamically.
🔍 Features:
🧠 Purpose:
This project demonstrates the use of DOM manipulation, event handling, and basic JavaScript logic in a small interactive web app