Created
May 31, 2018 08:44
-
-
Save adnanrahic/4ee0c90dcd1c996a740c9c4877ca0805 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const moment = require('moment'); | |
exports.handler = async (event) => { | |
const min = 1; | |
const max = 6; | |
const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min; | |
const now = moment().format(); | |
const message = 'Your dice throw resulted in ' + | |
randomNumber + ' and was issued at ' + now; | |
return message; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment