Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
sandeepMcodeX wants to merge 1 commit into zpratikpathak:master
base: master
Choose a base branch
Loading
from sandeepMcodeX:my-js-project

Conversation

@sandeepMcodeX
Copy link
Contributor

@sandeepMcodeX sandeepMcodeX commented Oct 18, 2025

🧮 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:

  • Displays current counter value in real time
  • Three main buttons: Increase ➕, Decrease ➖, and Reset 🔄
  • Clean and responsive UI design
  • Beginner-friendly JavaScript implementation

🧠 Purpose:

This project demonstrates the use of DOM manipulation, event handling, and basic JavaScript logic in a small interactive web app

Copy link
Contributor

Copilot AI left a 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.

Comment on lines +10 to +16
outputValue.innerText = resultValue - userInputValue;
});

increaseButton.addEventListener('click', () => {
const resultValue = parseInt(outputValue.innerText);
const userInputValue = parseInt(userInput.value);
outputValue.innerText = resultValue + userInputValue;
Copy link

Copilot AI Oct 18, 2025

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.

Suggested change
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);

Copilot uses AI. Check for mistakes.
```bash
git clone https://github.com/your-username/counter-app.git
````

Copy link

Copilot AI Oct 18, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Hi sir
I wanted to check if my pull request has been reviewed or merged yet. Could you please confirm the current status?
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /