Random Quote Generator Tweet Button not working

Please help, I’ve been working on this project all day and I can’t get the tweet button to work. It does not open up to another page. I’ve tried target _blank and window.open and nothing happens. What am I missing? Here is my code: https://codepen.io/Wongala/pen/ZKoMWN

Have you got a pop up blocker installed? It’s opening a new window when I try it on latest Safari.

Thanks for responding. I’ve still been working on it and made var randomQuote and author globally instead of locally and that somehow allowed the new window. Now its just saying undefined

It’ll say undefined until you click the button because randomQuote only gets defined when the user clicked ‘New Quote’.

Ahhh, Thanks so much!