Random Quote Generator -- CodePen

Drawbacks in my code:

  • I couldn’t implement “Post the quote to twitter” feature. Check my error.
  • Also, I don’t prefer using jQuery for getting the API from the webserver. But, I couldn’t use fetch request to solve this issue.

Please feedback me . Welcome to all responses.

1 Like

Hello Cassin,

I suggest you to add some colors to your webpage.
Try to nest buttons and the quote inside a div element and align the div to the center of the page using “col-xs-6” and “col-xs-offset-3”.
Assign a random color generator to btn1. (You can do this using “Math.Random ()” and hexa color codes.
You can send the quotes to tweet using twitter API ‘https://twitter.com/intent/tweet?text=’ and assigning this to your anchor tag href.

Feel free to go through my project if you get stucked.

All the best!

Thanks sachithra. Will finish those corrections and get back to you.