-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrandomQuoteGenerator.js
More file actions
22 lines (12 loc) · 985 Bytes
/
Copy pathrandomQuoteGenerator.js
File metadata and controls
22 lines (12 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var randomQuote = new Array();
randomQuote[0] = ""Strive not to be a success, but rather to be of value"<span class='author'>-Albert Einstein</span>";
randomQuote[1] = ""We make a living by what we get, but we make a life by what we give"<span class='author'>-Winston Churchill</span>";
randomQuote[2] = ""Success is getting what you want, happiness is wanting what you get"<span class='author'>― W.P. Kinsella</span>";
randomQuote[3] = ""If you can dream it, you can do it"<span class='author'>― Walt Disney</span>" ;
randomQuote[4] = ""At the end of the day, let there be no excuses, no explanations, no regrets"<span class='author'>―Steve Maraboli</span>" ;
var randomNumber = Math.floor(Math.random() * randomQuote.length);
setInterval("somerandom()", 4000);
function somerandom(){
document.getElementById("quote").innerHTML=randomQuote[randomNumber];
randomNumber = Math.floor(Math.random() * randomQuote.length);
}