I believe there is a bug in the test suit because when i run the test it will go from 11 out of 12 to 8 out of 12. Somethings going on and i didn’t make any changes to the code. Here is a length to my project: https://codepen.io/jsamuel1/pen/OeNbXz
oh ok gotcha. However i do have a question about a user story?
I can tweet the current quote by clicking on the
#tweet-quotea
element. This
aelement should include the
"twitter.com/intent/tweet"path in it's
hrefattribute to tweet the current quote.
The question how do i create the tweet using html and javascript. Im kind of lost i dont even know where to start?
You can construct the URL using:
twitter URL + randomQuote + randomAuthor
Use the encodeURIComponent()
function on the quote/author strings. Then set the href
on the tweet button to that new URL string. Also, remember to add target="_blank"
to the tweet button element.
You also can look at the example project for some help (ignore the inIframe and openURL functions)
https://codepen.io/freeCodeCamp/pen/qRZeGZ?editors=1010