SHARE
TWEET

Untitled

a guest Jul 16th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. exports.handler = (event, context, callback) => {
  2.     const quotes = [{
  3.         author: "Oscar Wilde",
  4.         quote: "Be yourself; everyone else is already taken."
  5.     }, {
  6.         author: "Mahatma Gandhi",
  7.         quote: "Be the change that you wish to see in the world."
  8.     }, {
  9.         author: "Friedrich Nietzsche",
  10.         quote: "Without music, life would be a mistake"
  11.     }];
  12.  
  13.     const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];
  14.  
  15.     callback(null, randomQuote);
  16. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top