MCPcopy Create free account
hub / github.com/serverless/examples / getRandomInt

Function getRandomInt

aws-node-alexa-skill/handler.js:4–4  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

2
3// Returns a random integer between min (inclusive) and max (inclusive)
4const getRandomInt = (min, max) => Math.floor(Math.random() * ((max - min) + 1)) + min;
5
6module.exports.luckyNumber = (event, context, callback) => {
7 const upperLimit = event.request.intent.slots.UpperLimit.value || 100;

Callers 1

handler.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected