Hello, fellow developers! Today, I am excited to share a fun and simple project that I recently worked on: an Advice Generator website. This project fetches random pieces of advice from an external API and displays them on a webpage. It's a great way to practice working with APIs and building interactive web applications.
The Advice Generator website is a straightforward application that allows users to get random advice at the click of a button. It uses the Advice Slip API to fetch advice and display it on the webpage.
- Fetches Advice: Retrieves random advice from the Advice Slip API.
- Displays Advice: Shows the advice along with an advice number.
- Interactive Button: Users can fetch new advice by clicking a button.
- HTML: For the structure of the webpage.
- CSS: For styling the webpage.
- JavaScript: For fetching data from the API and updating the DOM.
To get started with the project, follow these steps:
-
Clone the repository:
git clone https://github.com/abhishekgurjar-in/Advice-Generator.git
-
Open the project directory:
cd Advice-Generator
-
Run the project:
- You can either run it on a local server or simply open the
index.html
file in a web browser.
- You can either run it on a local server or simply open the
- Open the website in a web browser.
- Click the "Get Advice" button to fetch a new piece of advice.
- Enjoy the wisdom!
You can check out the live demo of the Advice Generator website here.
Building the Advice Generator website was a fun and educational experience. It helped me practice working with APIs and building interactive web applications. I hope you find this project as enjoyable and informative as I did. Feel free to clone the repository and play around with the code. Happy coding!
- This project uses the Advice Slip API.
- Abhishek Gurjar