JS-Random-Quote-Generator
JS-Random-Quote-Generator copied to clipboard
A program that displays a randomly selected quote each time the user clicks a button.
random-quote-generator
Treehouse Techdegree Project #1 - Random Quote Generator
In this project, you'll create an app that displays random famous quotes each time a button is clicked. You can display a quote from a famous athlete, politician, or historical figure:
"The only thing we have to fear is fear itself." — Franklin Delano Roosevelt.
You'll need to use your knowledge of basic JavaScript syntax, including variables, loops and object literals, to complete this project.
This project is a fun and effective way for you to practice fundamental JavaScript skills. It also gives you a simple interactive portfolio piece to show off your understanding of JavaScript.
Project Requirements
Create Array of Objects
- [x] Array of objects is named quotes
- [x] Array contains at least 5 quote objects
Quote Object
- [x] Objects in array include quote and source properties. If known, citation and date properties are present
getRandomQuote function
- [x] Function is named getRandomQuoteand returns a random object from the quotes array
printQuote function
- [x] Function named printQuote calls the randomQuote function
- [x] Function prints the quote to the page using the template supplied in the project instructions
Code comments
- [x] Comments are included in the code.
View Project
Live Demo of this project for peer review.
Appraiser Comments
Awesome work, Richard! Your project looks great and after seeing so many of these, I appreciate you changing the styling up.
Nice job ensuring that your function returns the entire quote object and then adding in those extra features! I added a hint in the individual rubric if you want to try creating a non-repeating randomizer.
You're ready to move on to the next project and get further into JavaScript. Have fun!
Thanks for being a Techdegree student.