Parsing Input as an Integer

Hey everyone! Does anyone know of a way to parse inputs as an integer? I’ve tried various methods from the Math JS library, as well as the built-in Number.isInteger() method, but still no luck.

(Note: I have the input type set to number, but that doesn’t prevent me from entering a string or char value)


I can’t figure out a way to ensure that users say/enter a valid number. Thanks!

Did you test on Alexa Developer Console? seems you tested with Voiceflow’s test.

Voiceflow’s test is handy and simple to check your logic, but text recognition or text speech does not work as same as Alexa does. So I recommend you should always test on Alexa Developer Console.

On Alexa Developer Console, AMAZON.Number will work as you expected. If you say other than number, its value will be “?”, I think.