Skip to content

mattboily/random-fact-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Random Fact Generator

A simple web application that fetches and displays a random "useless fact" from a public API. This project demonstrates basic HTML, CSS, and JavaScript, with a focus on integrating with a third-party API.

Features

  • Displays a new random fact with each button click.
  • User-friendly interface.
  • Handles API loading states and basic error messages.

Technologies Used

How to Run Locally

  1. Clone this repository: git clone https://github.com/mattboily/random-fact-generator.git
  2. Navigate to the project directory: cd random-fact-generator
  3. Open index.html in your web browser.

Live Demo

https://mattboily.github.io/random-fact-generator/

Learnings

This project was a great introduction to:

  • Setting up a basic web project.
  • Making asynchronous HTTP requests using the fetch API.
  • Handling JSON data.
  • DOM manipulation with JavaScript.
  • Deploying a static site with GitHub Pages.

About

Simple web app that generates random useless facts by parsing data from https://uselessfacts.jsph.pl/random.json?language=en

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published