From the course: Learning to Build Alexa Skills

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Complete skill handler

Solution: Complete skill handler - Amazon Web Services (AWS) Tutorial

From the course: Learning to Build Alexa Skills

Start my 1-month free trial

Solution: Complete skill handler

(upbeat music) - [Instructor] Let's take a look at the solution for our challenge. So first we're going to implement the MultiplicationIntentHandler and for convenience we're just going to select the AddIntentHandler here from line 28 down to line 62. Going to copy that code and let's paste it after our SubtractIntentHandler and that'll be the starting point for the MultiplicationIntentHandler. So first, let's change the name from Add to MultiplicationIntentHandler and in the canHandle function we want to change the intent name to match on MultiplicationIntent. So once those two changes are made, let's scroll on down to the operation. The result is going to be parseInt the first number, asterisks, the second number, and that's how we do multiplication in JavaScript. And next up for the speech text that we want Alexa to return to the user, the result of first number, we're going to change this to…

Contents