Quotes script not working - javascript

I have a script to display random quotes after clicking on button. Please help me understand why it is not working.
function quotes() {
var aquote = new Array;
aquote[0] = "\"Nobody exists on purpose. Nobody belongs anywhere. We're all
going to die.Come watch TV.\"";
aquote[1] = "\"Listen, Morty, I hate to break it to you but what people call
love is just a chemical reaction that compels animals to breed.It hits
hard, Morty, then it slowly fades, leaving you stranded in a failing
marriage.I did it.Your parents are gonna do it.Break the cycle, Morty.
Rise above.Focus on science."\"";
aquote[2] = "\"Weddings are basically funerals with cake.\""
aquote[3] = "\"There is no God, Summer. Gotta rip that band-aid off now
you’ ll thank me later.\""
aquote[4] = "\"I’m sorry, but your opinion means very little to me.\""
aquote[5] = "\"Being nice is something stupid people do to hedge their
bets.\""
rdmQuote = Math.floor(Math.random() * aquote.length);
document.getElementById("quote").value = aquote[rdmQuote];
}
window.onload = quotes;
<marquee><p id="quote"></p></marquee>

You have a syntax error on the aquote[1] line. In the end it should be Focus on science.\""; instead of Focus on science."\"";. Note the third quote from the end.
Once that is fixed, you need to set the innerText of quote, rather than its value. See the working snippet below:
<script>
function quotes(){
var aquote = new Array;
aquote[0]="\"Nobody exists on purpose. Nobody belongs anywhere. We're all going to die. Come watch TV.\"";
aquote[1]="\"Listen, Morty, I hate to break it to you but what people call love is just a chemical reaction that compels animals to breed. It hits hard, Morty, then it slowly fades, leaving you stranded in a failing marriage. I did it. Your parents are gonna do it. Break the cycle, Morty. Rise above. Focus on science.\"";
aquote[2]="\"Weddings are basically funerals with cake.\""
aquote[3]="\"There is no God, Summer. Gotta rip that band-aid off now you’ll thank me later.\""
aquote[4]="\"I’m sorry, but your opinion means very little to me.\""
aquote[5]="\"Being nice is something stupid people do to hedge their bets.\"";
rdmQuote = Math.floor(Math.random()*aquote.length);
document.getElementById("quote").innerText=aquote[rdmQuote];
}
window.onload=quotes;
</script>
<marquee><p id="quote"></p></marquee>

I see a couple problems. First line breaks are messing up where you declare the values. Second, you have an extra " mark on one of the lines. And last, you need to change the innerHTML not the value. Try this instead:
function quotes() {
var aquote = new Array;
aquote[0]="\"Nobody exists on purpose. Nobody belongs anywhere. We're all going to die. Come watch TV.\"";
aquote[1]="\"Listen, Morty, I hate to break it to you but what people call love is just a chemical reaction that compels animals to breed. It hits hard, Morty, then it slowly fades, leaving you stranded in a failing marriage. I did it. Your parents are gonna do it. Break the cycle, Morty. Rise above. Focus on science.\"";
aquote[2]="\"Weddings are basically funerals with cake.\"";
aquote[3]="\"There is no God, Summer. Gotta rip that band-aid off now you’ll thank me later.\"";
aquote[4]="\"I’m sorry, but your opinion means very little to me.\"";
aquote[5]="\"Being nice is something stupid people do to hedge their bets.\"";
rdmQuote = Math.floor(Math.random()*aquote.length);
document.getElementById("quote").innerHTML=aquote[rdmQuote];
}
window.onload=quotes;

Related

Whack-A-Mole game with huge bug! Can I get some help fixing it?

I am writing a Whack-A-Mole game for class using HTML5, CSS3 and JavaScript. I have run into a very interesting bug where, at seemingly random intervals, my moles with stop changing their "onBoard" variables and, as a result, will stop being assigned to the board. Something similar has also happened with the holes, but not as often in my testing. All of this is completely independent of user interaction.
You guys and gals are my absolute last hope before I scrap the project and start completely from scratch. This has frustrated me to no end. Here is the Codepen and my github if you prefer to have the images.
Since Codepen links apparently require accompanying code, here is the function where I believe the problem is occuring.
// Run the game
function run() {
var interval = (Math.floor(Math.random() * 7) * 1000);
if(firstRound) {
renderHole(mole(), hole(), lifeSpan());
firstRound = false;
}
setTimeout(function() {
renderHole(mole(), hole(), lifeSpan());
run();
}, interval);
}
What I believe is happening is this. The function runs at random intervals, between 0-6 seconds. If the function runs too quickly, the data that is passed to my renderHole() function gets overwritten with the new data, thus causing the previous hole and mole to never be taken off the board (variable wise at least).
EDIT: It turns out that my issue came from my not having returns on my recursive function calls. Having come from a different language, I was not aware that, in JavaScript, functions return "undefined" if nothing else is indicated. I am, however, marking GameAlchemist's answer as the correct one due to the fact that my original code was convoluted and confusing, as well as redundant in places. Thank you all for your help!
You have done here and there in your code some design mistakes that, one after another, makes the code hard to read and follow, and quite impossible to debug.
the mole() function might return a mole... or not... or create a timeout to call itself later.. what will be done with the result when mole calls itself again ? nothing, so it will just be marked as onBoard never to be seen again.
--->>> Have a clear definition and a single responsibility for mole(): for instance 'returns an available non-displayed mole character or null'. And that's all, no count, no marking of the objects, just KISS (Keep It Simple S...) : it should always return a value and never trigger a timeout.
Quite the same goes for hole() : return a free hole or null, no marking, no timeout set.
render should be simplified : get a mole, get a hole, if either couldn't be found bye bye. If a mole+hole was found, just setup the new mole/hole couple + event handler (in a separate function). Your main run function will ensure to try again and again to spawn moles.

Javascript random quote generator NO REPEAT

Please refer to www.thisyeariwantto.com This is the js code I am using to display "random" quotes... but the problem I keep having is that the quotes on the array repeat themselves. I want the user to come in click and click without ever seeing the same quote twice. How can I achieve this? Thank you in advance.
function jargonator(){
$('#head').text("This year I want to...");
$('#tag').text("");
var fragments = shuffle(
["gym","Fall in love(cliche), be happy and work abroad","stop fighting with my boyfriend","to finish things, no matter how long they take or how silly they are", "I'LL FINISH EVERY THING I START !","adopt a Koala","write a book","make a million","grow a pair","get married","drink less live more","figure out where i buried her","Give my girlfriend a real orgasm","Read more books","Save more money","Lose weight","Redecorate","Take better photos so that I can gain more instagram followers","Stop it with the #selfies","Travel","Stop cheating on my husband","Sell old unwanted stuff on eBay","Do something for charity","Get new boobs","Spend more time with kids","Spend Less time on Facebook","Totally revamp my wardrobe","Try a new hairstyle... down there ;)","Have a threesome","Get a six-pack... of premium artisanal beer","Eat less chocolate","Socialise more in real life rather than Facebook","Drink less alcohol","Eat an entire bowl of Ben & Jerrys without feeling guilty", "Start my own business","Recommend this site to all my friends","Tell Susan I have feelings for her","Stop hitting my girlfriend","Do less cocaine","Quit smoking","Get a promotion","stop saying, 'Ooh, that feels nice' whenever the security guys frisk me at airports.","work with neglected children. (my own)","balance my checkbook. (on my nose).","Learn how to use Twitter","Stop sleeping with my brother’s fiancée","Have a better relationship with my parents","do less laundry and use more deodorant","assure my lawyer that I will never again show up drunk at a custody hearing.","start shaving my legs again","Run a half or full marathon","Call people more than text","Stop texting 'LOL'","Stop sexting my cousin", "Watch less reality TV","Stop treating my cat like a real person","Stop buying every iphone that comes out","Stop sleeping with my ex","Stop faking my orgasms","go to the beach more often","get penis reduction surgery so my girl lets me fuck her in the ass","start pretending i'm gay so I can get free drinks at the rainbow room","stop lying on my resume","Exclude McDonald's from my daily diet","Stop considering ketchup a vegetable","stop pretending I have friends","Make at least one REAL friend","Learn how to spell 'thru'... 'thrugh'... 'trhouh'.... fuck it.","Get into a fight so I can finally use my mma skills","stop watching mma so my girlfriend stops thinking I'm gay","Paint my balls blue so I always have an excuse for my gf to jerk me off","Tell Rebecca to fuck off, she is such a bitch","tell my son he is adopted, and his real name is not Kyle... it is Rodrigo.","Stop being a hipster because everyone is doing it","Stop being a hipster, thats so 2013","stop taking naked pictures in snapchat","Reduce, reuse, recycle :)","Graduate!","Be happy!","Take more pictures","Learn how to twerk","stick my tongue out and not feel dirty...like Miley","ride naked on a wrecking ball...with a hammer","make my first legal pornographic movie...with a hidden camera...","learn japanese curse words","star on a rap video as one of the hoes in the back","get my freak on...it's been off way too long...and people are talking","stop showing my boobs so I get more likes","make my momma proud","stop sleeping with my boss's daughter","wear condoms more often","tell him he is not the real dad...","Have intense lesbian sex in public places.","stop making new year's resolutions.","finally dunk.","stop doing Molly","Eat the still beating Heart of Jeff Gordan","get rich doing what i like","Do the splits!","speak up","finally open my own practice","meet a girl","be more positive","Stop being an intern and get a job.","travel to where the soul meets body.","get a tattoo","be fearless","stop curating, start creating", "continue to make my boyfriend happy to the best of my ability.","leave The City and start really living","become a mermaid","Quit 'Call me maybe'","Do my Irish penpal", "Have more bacon, have more sex","study quantum physics so I can RULE THE WORLD","stop biting my nails","drink quality instead of quantity","sleep completely naked in a middle of a peaceful forest","Take a shower with Ryan Gosling","break the circle of no-life", "BOOMSHAKALAKA!!!","Break the Internet", "go back to the future","play hide & seek with strangers on the internet","file a complaint to the Karma Police","NOT fall in love","Stop making a Morgan Freeman voice when talking about Nelson Mandela's death","Make my husband allergic to viagra... i am tired!! :)","cast a worldwide campaign to protest against animal abuse","drink over 20 Mezcal shots in a row","star in the next Star Wars movie","get inspired","stop thinking 'It'll be our year... I'm the only one being the Zombie","Try and see if I can live on wine and sushi... and nothing else","Prove Einstein was wrong","Buy a hammock and work from there","forget about Teen Spirit","find the second star to the right, and go straight on till morning","Leave Narcissus alone","write a novel","make the team","go to all my AA meetings","spit in the face of convention","Somewhere I've never been yet","learn a new recipe", "Paint!", "learn to meditate and at least take one weekend for myself to travel.",]
)
$('#c').click(function () {
change(1000);
});
function change(time){
$('#tag').animate({
opacity: 0
}, time, function () {
$('#tag').html(fragments.pop()).animate({
opacity: 1
}, time)
});
}
function shuffle(o) { //v1.0
for (var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
};
change(0);
}
I really need help. If you need to see any other code of any of the other files please let me know. thank you very much.
you can just poping it from array
for( var i=0;i<fragments.length;i++){
str += fragments[i].pop();
if(i <fragments.length-1){str+=stub;}
}
if you do so, then it remove quote and you never have dublicates.
and before doing this, you can sort array random, then you will have different quotes every time
something like this.
We cannot control the value returned by Math.random() as you expecting. However try this workaround, every time a value is generated add it to another array, say mylist
var fragments =[
["quote1", "quote2", "quote3","etc", ... ]
var selected;
var temp;
var str = "";
var stub = "";
for( var i=0;i<fragments.length;i++){
temp = fragments[i][Math.floor(Math.random()*fragments[i].length)];
while(selected.contains(temp)){
temp = fragments[i][Math.floor(Math.random()*fragments[i].length)];
}
selected.push(temp);
str += temp;
if(i <fragments.length-1){str+=stub;}
}
$('#tag').animate({opacity:0.9},1000).append(str);
}
Eventually at some time all randoms get generated after that clear mylist and continue. At least random wont repeat until all elements in your fragments get selected once.

My switch statement or the document.write(); isn't working and i can't fix it

Hello I want to display a specific text each day and I don't know where is the problem in the following code, I am using jQuery mobile and I thought that javascript is the one that can do this on a web page.
<div data-role="content">
<div>
<script>
var n = new Date().getDay();
var ch = new String();
switch(n)
{
case 0:
{
ch = String("\“It is not so easy to leave your comfort zone, it is a very difficult thing to do,
but it most certainly will change your future and make you a better person than you ever could imagine\”<br><br>Today\'s challenge:<br><br>
Do you live in the future?<br><br>
Become aware of moments when you are lost in thinking about the future, whether it is 10 minutes or 2 years from now.
Notice how it pulls your attention from the present moment. See the reasons why you are running from your current experience.<br>");
}
break;
case 1:
ch = String("A dream is your creative vision for your life in the future. You must break out of your current comfort zone and become comfortable with the unfamiliar and the unknown.-Denis Waitley<br><br>
Today\'s challenge(Do one of them, or more if you like so...):<br><br>
Do everyday things differently.
Take a different route to work.
Try a new restaurant without checking Yelp first. Go vegetarian for a week, or a month.
Try a new operating system. Recalibrate your reality.
Whether the change you make is large or small, make a change in the way you do things on a day-to-day basis.
Look for the perspective that comes from any change, even if it\'s negative.
Don\'t be put off if things don\'t work out the way you planned.");
break;
case 2:
ch = String("Life begins at the end of your comfort zone. -Neale Donald Walsch<br<br>
Today\'s challenge:<br><br>
");
break;
case 3:
ch = String("The comfort zone is the great enemy to creativity; moving beyond it necessitates intuition,
which in turn configures new perspectives and conquers fears.- Dan Stevens<br><br>
Today\'s challenge:<br><br>
Trust yourself and make snap decisions. We\'re contradicting ourselves, but there\'s a good reason.
Just as there are people who thrive on snap decisions, others are more comfortable weighing all of
the possible options several times, over and over again. Sometimes making a snap call is in order,
just to get things moving. Doing so can help you kickstart your personal projects and teach you to trust your judgement.
It\'ll also show you there\'s fallout to quick decisions as well as slow ones.");
break;
case 4:
ch = String("Comedians tend to find a comfort zone and stay there and do lamer versions of themselves for the rest of their career.- Chris Rock<br><br>
Today\'s challenge:<br><br>
Take your time making decisions.
Sometimes slowing down is all it takes to make you uncomfortable—especially if speed and
quick thinking are prized in your work or personal life. Slow down,
observe what\'s going on, take your time to interpret what you see, and then intervene.
Sometimes just defending your right to make an educated decision can push you out of your comfort zone.
Think, don\'t just react.");
break;
case 5:
ch = String("I think when you get people who are really talented and you take them out of their comfort zone, you get a lot more out of them.- Gore Verbinski<br><br>
Today\'s challenge:<br><br>
Do it in small steps. It takes a lot of courage to break out of your comfort zone.
You get the same benefits whether you go in with both feet as you do if you start slow, so don\'t be afraid to start slow.
If you\'re socially anxious, don\'t assume you have to muster the courage to ask your crush on a date right away,
just say hello to them and see where you can go from there. Identify your fears, and then face them step by step.");
break;
case 6:
ch = String("When you go out of your comfort zone and it works there's nothing more satisfying.- Kristen Wiig<br><br>
Today\'s challenge:<br><br>
Be aware of attachment to objects<br><br>
Notice your attachments to objects such as a cool sweater, a new gadget or any other thing that would make you feel bad if you lost it.
What is the deep reason for being attached to them? Can you find the strength to let go of the attachment and give the object away?");
break;
}
document.write("<p>" + ch.big() + "</p>");
</script>
</div>
<form>
<label for="textarea-1">Post on Facebook:</label>
<textarea cols="40" rows="8" name="textarea-1" id="textarea-1" >
</textarea>
</form>
<input type="submit" value="Post to Facebook">
</div><!-- /content -->
Javascript treats every new line as separate statement and You are using multiline string
so use \ at each end of the line in string(..) to make it one string
I have edited and added \ in this demo fiddle
There's a couple of things. Like shadow said, you need to ensure the multiline strings are dealt with properly. Also in case 0: you don't need the curly brackets around the main clause. You have them right for the other cases.
I'm going to make a suggestion that might make it a bit easier. Hold the information you want in an array in an object:
obj = {
0: [
'day one',
'this is what\'s happened',
'we\'re separating up the text so that we keep the line lengths manageable'
],
1: [
'blah blah',
'blah blah'
]
};
Then all you have to do is:
var n = new Date().getDay();
var info = obj[n].join('');
document.write("<p>" + info.big() + "</p>");

javascript random quote generator not printing

I'm trying to generate a fresh quote from a list on every refresh. For some reason, I can't get the quotes to show up within the div, and I'm not sure why.
Any help would be greatly appreciated!
<div id="quotes">
<script>
var quotes = new Array();
quotes[0] = "<i>Quote 1</i><br><b>Author</b>";
quotes[1] = "<i>Quote 2</i><br><b>Author</b>";
var random = Math.ceil (Math.random() * quotes.length) - 1;
$('quotes').set('html', quotes[random]);
</script>
</div>
I've updated my code thanks to everyones help to this-
<div id="quotes"></div>
<script>
var quotes = [
"<i>"Some people feel the rain. Others just get wet."</i><br><b>Bob Marley/b>",
"<i>“Do not pray for an easy life, pray for the strength to endure a difficult one.”</i><br><b>Bruce Lee</b>",
"<i>“Success is not final, failure is not fatal: it is the courage to continue that counts.”</i><br><b>Winston
Churchill</b>",
"<i>If your dreams don’t scare you they’re not big enough.</i><br><b></b>",
"<i>“It takes courage to grow up and become who you really are.”</i><br><b>E.E. Cummings</b>",
"<i>All endings are also beginnings, we just don’t know it yet.</i><br><b></b>",
"<i>There are three kinds of people: Those who make it happen, those who watch it happen, and
those who wonder what the heck happened.</i><br><b></b>",
"<i>There are people so poor, that the only thing they have is money.</i><br><b></b>",
"<i>“Things do not happen. Things are made to happen.”</i><br><b>John F. Kennedy</b>",
"<i>“Destiny is a name often given in retrospect to choices that had dramatic consequences.”</i><br><b>J.K. Rowling</b>",
"<i>“When I was 5 years old, my mother always told me that happiness was the key to life.
When I went to school, they asked me what I wanted to be when I grew up. I wrote
down ‘happy’. They told me I didn’t understand the assignment, and I told them they didn’t
understand life.”</i><br><b>John Lennon</b>",
"<i>“Not all those who wander are lost”</i><br><b>JRR Tolkien</b>",
"<i>We all die. The goal isn’t to live forever, the goal is to create something that will.</i><br><b></b>",
"<i>Strive for progress, not perfection.</i><br><b></b>",
"<i>What defines us is how well we rise after falling.</i><br><b></b>",
"<i>“It’s not hard to make decisions once you know what your values are.”</i><br><b>Roy E. Disney</b>",
"<i>Sorry’s not good enough.</i><br><b></b>",
"<i>I may not be there yet, but I’m closer than I was yesterday.
Every day is a new beginning. Stay away from what might have been and look at what can
be.</i><br><b></b>",
"<i>Who inspires you?</i><br><b></b>",
"<i>“If you play by the rules long enough, then you can change the game.”</i><br><b>Enders Game</b>"
];
document.getElementById('quotes').innerHTML = quotes[Math.floor(Math.random() * quotes.length)];
</script>
For some reason, the div is still loading without any content thought.
It was the quotes inside of my quotes messing it up. Thank you everyone for the help!!
Removing the need for any library makes the code a lot easier to not botch.
<div id="quotes"></div>
<script>
var quotes = [
"<i>Quote 1</i><br><b>Author</b>",
"<i>Quote 2</i><br><b>Author</b>"
];
document.getElementById('quotes').innerHTML =
quotes[Math.floor(Math.random() * quotes.length)];
</script>
EDIT: Nevermind, seems like $ in MooTools should indeed return the element with the id quotes. If you wanted to do the same thing with no frameworks, you could use document.getElementById('quotes').innerHTML = quotes[random].
Your $ is trying to find an element called <quotes>, not an element with the id "quotes" (assuming that it uses CSS selectors like jQuery). Using $('#quotes') should fix it.
A few other things: You could write the array in a much more concise fashion:
quotes = [
"<i>Quote 1</i><br><b>Author</b>",
"<i>Quote 2</i><br><b>Author</b>"
];
Also, you could just use Math.floor instead of Math.ceil for your random value, then you wouldn't need the - 1 at the end.

javascript array only works when not completely full of content

I have an array full of quotes, and on load a random quote is displayed. The problem I'm having is everything works fine when I only have 2 quotes loaded, but when I added the entire list, it no longer runs.
Here is the code that works-
<div id="quotes">Quotes</div>
<script type="text/javascript">
var quotes = [
"<i>Some people feel the rain. Others just get wet.</i><br><b>Bob Marley</b>",
"<i>Do not pray for an easy life, pray for the strength to endure a difficult one. </i><br><b>Bruce Lee</b>"
];
document.getElementById('quotes').innerHTML = quotes[Math.floor(Math.random() * quotes.length)];
</script>
The above works as expected, however when I add the rest of the quotes (as seen below) The script no longers works.
<div id="quotes"></div>
<script type="text/javascript">
var quotes = [
"<i>Some people feel the rain. Others just get wet.</i><br><b>Bob Marley/b>",
"<i>Do not pray for an easy life, pray for the strength to endure a difficult one. </i><br><b>Bruce Lee</b>",
"<i>Success is not final, failure is not fatal: it is the courage to continue that counts.</i><br><b>Winston
Churchill</b>",
"<i>If your dreams don’t scare you they’re not big enough.</i><br><b></b>",
"<i>It takes courage to grow up and become who you really are.</i><br><b>E.E. Cummings</b>",
"<i>All endings are also beginnings, we just don’t know it yet.</i><br><b></b>",
"<i>There are three kinds of people: Those who make it happen, those who watch it happen, and
those who wonder what the heck happened.</i><br><b></b>",
"<i>There are people so poor, that the only thing they have is money.</i><br><b> </b>",
"<i>Things do not happen. Things are made to happen.</i><br><b>John F. Kennedy</b>",
"<i>Destiny is a name often given in retrospect to choices that had dramatic consequences.</i><br><b>J.K. Rowling</b>",
"<i>When I was 5 years old, my mother always told me that happiness was the key to life.
When I went to school, they asked me what I wanted to be when I grew up. I wrote
down ‘happy’. They told me I didn’t understand the assignment, and I told them they didn’t
understand life.</i><br><b>John Lennon</b>",
"<i>Not all those who wander are lost</i><br><b>JRR Tolkien</b>",
"<i>We all die. The goal isn’t to live forever, the goal is to create something that will.</i><br><b></b>",
"<i>Strive for progress, not perfection.</i><br><b></b>",
"<i>What defines us is how well we rise after falling.</i><br><b></b>",
"<i>It’s not hard to make decisions once you know what your values are.</i><br><b>Roy E. Disney</b>",
"<i>Sorry’s not good enough.</i><br><b></b>",
"<i>I may not be there yet, but I’m closer than I was yesterday.
Every day is a new beginning. Stay away from what might have been and look at what can
be.</i><br><b></b>",
"<i>Who inspires you?</i><br><b></b>",
"<i>If you play by the rules long enough, then you can change the game.</i><br> <b>Enders Game</b>"
];
document.getElementById('quotes').innerHTML = quotes[Math.floor(Math.random() * quotes.length)];
</script>
You can't have newlines in JavaScript strings. You need to change this:
"str part
the rest"
to this:
"str part\nthe rest"
or
"str part\n"
+ "the rest"
You should check the JavaScript console for errors; this can help you debug
Also, you can write multiple-lined strings like this:
var str = "beginning \
continue \
end.";
The backslash before the line break is another solution.
The line breaks inside strings caused the issue. Here is fully working code:http://jsfiddle.net/whizkid747/5tyrY/
<div id="quotes">Quotes</div>
<script type="text/javascript">
var quotes = [
"<i>Some people feel the rain. Others just get wet.</i><br><b>Bob Marley</b>",
"<i>Do not pray for an easy life, pray for the strength to endure a difficult one.</i><br><b>Bruce Lee</b>",
"<i>Success is not final, failure is not fatal: it is the courage to continue that counts.</i><br><b>WinstonChurchill</b>",
"<i>If your dreams don’t scare you they’re not big enough.</i><br><b></b>",
"<i>It takes courage to grow up and become who you really are.</i><br><b>E.E. Cummings</b>",
"<i>All endings are also beginnings, we just don’t know it yet.</i><br><b></b>",
"<i>There are three kinds of people: Those who make it happen, those who watch it happen, and those who wonder what the heck happened.</i><br><b></b>",
"<i>There are people so poor, that the only thing they have is money.</i><br><b> </b>",
"<i>Things do not happen. Things are made to happen.</i><br><b>John F. Kennedy</b>",
"<i>Destiny is a name often given in retrospect to choices that had dramatic consequences.</i><br><b>J.K. Rowling</b>",
"<i>When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy’. They told me I didn’t understand the assignment, and I told them they didn’t understand life.</i><br><b>John Lennon</b>",
"<i>Not all those who wander are lost</i><br><b>JRR Tolkien</b>",
"<i>We all die. The goal isn’t to live forever, the goal is to create something that will.</i><br><b></b>",
"<i>Strive for progress, not perfection.</i><br><b></b>",
"<i>What defines us is how well we rise after falling.</i><br><b></b>",
"<i>It’s not hard to make decisions once you know what your values are.</i><br><b>Roy E. Disney</b>",
"<i>Sorry’s not good enough.</i><br><b></b>",
"<i>I may not be there yet, but I’m closer than I was yesterday. Every day is a new beginning. Stay away from what might have been and look at what can be.</i><br><b></b>",
"<i>Who inspires you?</i><br><b></b>",
"<i>If you play by the rules long enough, then you can change the game.</i><br> <b>Enders Game</b>"
];
document.getElementById('quotes').innerHTML = quotes[Math.floor(Math.random() * quotes.length)];
</script>

Categories