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?
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
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!
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