Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help with the following code? my code: \"use strict\"; /* New Perspectives

ID: 3734807 • Letter: N

Question

Need help with the following code?

my code:

"use strict";
/*
New Perspectives on HTML5 and CSS3, 7th Edition
Tutorial 9
Case Problem 3

Random Jane Austen Quote Generator
Author: Arcadio Mejia
Date: March 21, 2018

This script randomly generates a Jane Austen quote from
a list of 10 quotes and writes that quote into the first
quotation tag in the Web page.

*/
function randomInt (lowest, size) {
lowest + size*math.random();

}
function getQuote(n) {
var quotes = [
"It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife.",
"I hate to hear you talk about all women as if they were fine ladies instead of rational creatures. None of us want to be in calm waters all our lives.",
"Silly things do cease to be silly if they are done by sensible people in an impudent way.",
"Give a girl an education and introduce her properly into the world, and ten to one but she has the means of settling well, without further expense to anybody.",
"Life seems but a quick succession of busy nothings.",
"Our scars make us know that our past was for real.",
"I cannot speak well enough to be unintelligible.",
"One cannot be always laughing at a man without now and then stumbling on something witty.",
"Men were put into the world to teach women the law of compromise.",
"The person, be it gentlemen or lady, who has not pleasure in a good novel, must be intolerably stupid."
];

return quotes[n];
}

Explanation / Answer

"use strict"; /* New Perspectives on HTML5 and CSS3, 7th Edition Tutorial 9 Case Problem 3 Random Jane Austen Quote Generator Author: Arcadio Mejia Date: March 21, 2018 This script randomly generates a Jane Austen quote from a list of 10 quotes and writes that quote into the first quotation tag in the Web page. */ function randomInt (lowest, size) { return lowest + Math.floor(Math.random()*size); } function getQuote(n) { var quotes = [ "It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife.", "I hate to hear you talk about all women as if they were fine ladies instead of rational creatures. None of us want to be in calm waters all our lives.", "Silly things do cease to be silly if they are done by sensible people in an impudent way.", "Give a girl an education and introduce her properly into the world, and ten to one but she has the means of settling well, without further expense to anybody.", "Life seems but a quick succession of busy nothings.", "Our scars make us know that our past was for real.", "I cannot speak well enough to be unintelligible.", "One cannot be always laughing at a man without now and then stumbling on something witty.", "Men were put into the world to teach women the law of compromise.", "The person, be it gentlemen or lady, who has not pleasure in a good novel, must be intolerably stupid." ]; return quotes[n]; }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote