My code to share the quote does not work, it open a new window but does not add the quote. This is my code:
var currentQuote ="";
function myQuote () {
var randomNumber = Math.floor(Math.random() * (quotes.length));
document.getElementById("quote").innerHTML = quotes[randomNumber];
var currentQuote = $("#quote").text();
}
var shareMyQuote = function() {
window.open('https://twitter.com/intent/tweet?&text=' + currentQuote);
};
Am I doing something wrong??