randomQuoteGenerator [solved]

randomQuoteGenerator [solved]
0.0 0

#1

how to get my quote and source to go into the html?

the JS works by itself (tested in console, VS Code).

so my variables are q = quote, s = source (who said it)
(both are stored in JS array, not doing API)


#2

There are some errors in your JS file. Try to find and fixed and you should get a working page. After that you can fix the next button to change the quotes.


#3

i’ve been going over this for days.

can’t seem to find what is wrong.

currently the random quote finally fills the space upon load/reload.
but can’t get button to work. :frowning:


#4

Here an working version of your code.


#6

wow thanks!
i see now.

i was trying to put my var in the ready function. that’s not a good idea.


#7

Yep. Look here to see the same pen not working because the var is only scoped to doc.ready function.


#8

it’s always the little things, huh?
lol
thanks a million!


#9

You are very welcome. Happy coding :+1: