Generate Random Quotes and Messages

I hope this blog is useful to anyone who wants to incorporate a random motivational quote or ‘tip of the day’ message into their projects.  I attached a sample .cptx file as well.   randomQuotes

Step 1: Write the Quotations in an Array

The hardest part about creating any random quote generator is finding, copying and pasting the actual quotes.  Luckily there are lots of websites such as textfiles.com that could help you out – that’s where I got this file.  Your array must be in the following format:

var cmt = [

“quotation 1”,

“quotation 2”,

“quotation 3”,

“quotation 4”

];

If you have 100’s of quotes, you want to make sure that each starts and ends with a proper quotation mark. There should not be quotation marks anywhere else.  Each quotation is separated by a comma. There should not  be a comma on the last quote.

Read the full story by

Tags:

RELATED READS
Basic Video Editing: Cut, Copy, Delete, and Crop 4 Killer Examples Of Using Mobile Apps In Corporate Training
We are updating our Privacy Policy, so please make sure you take a minute to review it. As of May 25, 2018 your continued use of our services will be subject to this new Privacy Policy.
Review Privacy Policy OK