-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.js
58 lines (51 loc) · 1.86 KB
/
scripts.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
let randomQuote;
let randomAuthor;
function getQuote() {
let quotes = [
"Wherever you go, no matter what the weather, always bring your own sunshine",
"The best thing one can do when it's raining is to let it rain",
"Nature is not a place to visit. It is home",
"The mountains are calling and I must go",
"I am glad I will not be young in a future without wilderness",
"An early morning walk is a blessing for the whole day",
"Nature does not hurry, yet everything is accomplished",
"Earth laughs in flowers",
"No snowflake ever falls in the wrong place",
"In all things of nature there is something of the marvelous",
"Nature never hurries. Atom by atom, little by little she achieves her work",
"Look deep into nature, and then you will understand everything better",
"The trees that are slow to grow bear the best fruit",
"Nature is a mutable cloud which is always and never the same",
"There are no lines in nature, only areas of colour, one against another",
"Chaos was the law of nature; Order was the dream of man",
"At the end of the day, we can endure much more than we think we can"
];
let author = [
"Anthony J. D'Angelo",
"Henry Wadsworth Longfellow",
"Gary Snyder",
"John Muir",
"Aldo Leopold",
"Henry David Thoreau",
"Lao Tzu",
"Ralph Waldo Emerson",
"Zen proverb",
"Aristotle",
"Ralph Waldo Emerson",
"Albert Einstein",
"Moliere",
"Ralph Waldo Emerson",
"Edouard Manet",
"Henry Adams",
"Frida Kahlo"
];
// round number
let randomNumber = Math.floor(Math.random() * quotes.length);
randomQuote = quotes[randomNumber];
randomAuthor = author[randomNumber];
console.log(randomQuote);
quote = document.querySelector("#quote");
author = document.querySelector("#author");
quote.innerHTML = `${randomQuote}`;
author.innerHTML = `${randomAuthor}`;
}