Can't get this quote generator to work?

This is my random quote generator: https://codepen.io/joellemulzac/pen/KZMeXy

For some reason, the tweet button only works when I put the variable randomNumber outside of the function randomQuote(), and a quote doesn’t show up when the page first loads. Any ideas on what may be causing these problems? I would greatly appreciate the help.

Joelle

Thank you so much for your reply! I was able to fix it.