Make a Simple Quote Generator in JavaScript!

Victoria Lo
verclaire nine
Published in
4 min readMay 29, 2020

--

So after publishing How to Build You Personal Portfolio Website, someone reached out to me to ask me how I made the quote generator on my website so here’s the tutorial.

My website’s quote generator

Step 1: Quotes

To make a quote generator, the first ingredient is quotes! Start by creating a file called quotes.js and in it, an array called quotes to store your quotes.

If you are like me and love to collect quotes then this is the time for you to start digging out the quotes you have collected. If you don’t collect quotes and not sure where to start, I have a bunch here for you:

var quotes = [
'\"Life isn\'t about finding yourself, it is about creating yourself.\"\n\n-George Bernard Shaw',
'\"If you are going down the right path and you are willing to keep walking, eventually you\'ll make progress.\"\n-Barrack Obama',
'\"I have far more respect for the person with a single idea who gets there than one with a thousand ideas and does nothing.\"\n-Thomas Edison',
'\"What is necessary to change a person is to change awareness of himself.\"\n\n-Anonymous',
'\"Many people die at the age of 25, but their bodies are not buried until

--

--

Victoria Lo
verclaire nine

A nerd in books, tea and programming. I publish weekly on my personal blog: https://lo-victoria.com/