Can I get some help with my Random Quote Generator?

Can I get some help with my Random Quote Generator?
0.0 0

#1

Hello all. At this point I am trying to get my random quote generator working just using only a javascript array and not an API; I plan on tweaking the CSS after the quote works. I feel that I am close to getting it to work. Can someone help me please?


#2

I just forked your code to do an experiment. I think the JavaScript is getting confused because your variable name is the same as your function name. I changed the variable to ‘randomQuotes’ instead of ‘randomQuote’ and it worked.
https://codepen.io/esperanato/pen/KmYVXj


#3

Thanks Aldek! That makes sense now that I think about it. Now I just have to make it look good and see about this tweet button!


#4

The tweet button had me stuck for a while. My biggest challenge was trying to ensure the tweet was under 140 characters, as the quote API I used had some very long quotes.

Good luck! I hope you have fun with it. I found it a really interesting challenge.

cheers,
Ali