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.
- Array of objects is named quotes
- Array contains at least 5 quote objects
- Objects in array include quote and source properties. If known, citation and date properties are present
- Function is named getRandomQuoteand returns a random object from the quotes array
- Function named printQuote calls the randomQuote function
- Function prints the quote to the page using the template supplied in the project instructions
- Comments are included in the code.
Live Demo of this project for peer review.
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.