Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Random Quote Generator!! Build a random quote generator, a program that displays a randomly selected quote each time the user clicks a button. Starter Code:

Random Quote Generator!!

Build a random quote generator, a program that displays a randomly selected quote each time the user clicks a button.

Starter Code:
/***
* `quotes` array
***/


/***
* `getRandomQuote` function
***/


/***
* `printQuote` function
***/


document.getElementById('load-quote').addEventListener("click", printQuote, false);

Guidelines

You don’t have to abide by these guidelines, but if you’re not sure how to start this or how to organize the quotes or anything like that, this guideline can help you out

Array of objects

is named quotes.

contains at least 5 quote objects.

Objects

All objects have quote and source properties.

At least one object should have a citation property.

At least one object should have a year property.

BONUS

At least one object has at least one additional property, such as tags.

At least one additional property prints to the page with its quote.

getRandomQuote function

create a getRandomQuote function:

is named getRandomQuote.

returns a random object from the quotes array.

printQuote function

create a printQuote function:

is named printQuote.

calls the getRandomQuote function.

prints a quote and a source property with every quote.

prints a citation property with at least one quote.

prints a year property with at least one quote.

printed quotes match the format, layout, and styles of the example quote in the index.html file.

BONUS

Quotes automatically refresh at regular intervals.

Background color changes to a random color each time the quote refreshes.

PLS ANSWER USING JAVASCRIPT

Thank you!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions

Question

What is port number for ( HTTP ) Hyper Text Transfer Protocol

Answered: 1 week ago