Random Quote Generator - button not triggering

Hi,

I’m working on the Random Quote Generator and the button is not triggering a new quote.
I’m keeping it simple on this one and using an array that I’ve built.

I’ve looked around but can’t get it to work - I’m missing something. I’m not grasping the concept.

Please, what am I not understanding?

Thanks for your time.

Regards

<button id = "getQuote" class = "button" onclick="getElementById("quote").innerHTML = getRandomQuote()">

On the onclick, you have double quotes inside double quotes which is closing the attribute prematurely and thus causing errors. Replace "quote" with 'quote' for the onclick to fire properly.

Furthermore the onclick should probably just be onclick=getRandomQuote(), if you’re looking to fire that on click.

Good luck!

Thanks!

D’uh! of course those lines should be in the function. that was dumb slip-up. that’s fixed that.
Thanks again.

Regards