Simple Counter Web App

Welcome to the Simple Counter Web App project! This is a basic web application that allows users to increment and decrement a counter. It's built using HTML, CSS, and JavaScript.

Required Prerequisite

  1. Begin by installing the "Live Server" extension by Ritwick Dey for Visual Studio Code. This extension enables you to easily run HTML files in your browser.

  2. Open Visual Studio Code, and on the left-hand side, click on the "Extensions" icon.

  3. In the search bar, type "Live Server" by Ritwick Dey and select the extension from the results. Install it.

  4. Once the extension is installed, open the HTML file that you've cloned or created. You'll notice a new option at the bottom of your window labeled "Go Live".

  5. Click on "Go Live". This will automatically serve your HTML file on a localhost server.

Contributing (What you need to do)

If you've followed the previous steps correctly, you should see a webpage displaying two buttons: "+" and "-", along with the number "0". This constitutes a basic counter application. However, at this point, the buttons do not function as intended.

Here's how you can proceed:

  1. Begin by modifying the code in the index.js file to ensure the counter buttons work as expected.

  2. Once you've completed the above task, verify that the count functionality is now operational. Clicking "+" should increment the count, while clicking "-" should decrement it.

  3. For the next task, implement a feature to prevent the count from going below zero.

Note: It's recommended to attempt these tasks independently. If you encounter difficulties, don't hesitate to utilize resources like Google or ChatGPT. This is a common practice among developers; they often spend more time troubleshooting and fixing bugs than writing new code. Remember, seeking help is a crucial part of the development process.

1. Fork the Repository

  1. Click on the "Fork" button at the top-right corner of this repository's page. This will create a copy of the repository under your own GitHub account.

2. Clone the Repository

Clone your forked repository to your local machine using the following command in your terminal:

  git clone https://github.com/Sranjan0208/Counter-App.git

3. Make Changes

  1. Navigate to the project directory:
    cd Counter-App
  2. Open the index.js file and make the necessary changes to the code. This is where you'll implement the counter functionality.

4. Test Locally

Open the index.html file in a web browser to test the changes locally.

5. Commit Changes

Once you're satisfied with your changes, commit them to your local repository:

git add .
git commit -m "Add counter functionality"

6. Push Changes

Push the changes to your forked repository:

git push origin main

7. Create a Pull Request

  1. Navigate to your forked repository on GitHub.
  2. Click on the "Pull Request" button.
  3. Provide a title and description for your pull request, detailing the changes you've made.