Here’s a simple example of a random quote generator written in JavaScript. This can be embedded on a website to display a new quote each time the user clicks a button or refreshes the page.
This code creates a clean, simple interface that shows a quote and author, and a button that, when clicked, picks a new random quote from the array and displays it.
You can expand the quotes array with your own favorite quotes to customize it.
Share this Page your favorite way: Click any app below to share.