Random quote challenge - need help please!

Hi everybody!
As you can see, clicking the button generates a random number, but only once.
It doesn’t work the second time.
How can I fix it? where am I wrong?

I moved the line
var rand = quote[(Math.random()*quote.length|0)];
to inside $("#randomize).on(‘click’) and it worked for me.

However, although it is not explicitly stated, I think this project is meant to teach you how to use jquery’s AJAX, not make your own quotes.

If you’re unsure of how to start, there are a bunch of posts on the forums on this already. The basic idea is to find a website that will generate the quotes for you, get the quotes from them using AJAX, and display them.

your code only generate random number once, it is when rand variable was made.

try to move your Math.random() formula inside the on(“click”, function()) so that new random number appear each time you click the button

Thank you man! you are great!
now I’ll try this with ajax.
Hope will work…