In console.log I received an output on object canHandle: [Function: canHandle] and in second canHandle: [Function]. Whats the difference in between?
const SessionEndedRequest = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'SessionEndedRequest';
}
};
returns canHandle: [Function: canHandle]
and
obj = {};
obj.canHandle = function (handlerInput) {
return handlerInput.requestEnvelope.request.type === that.type
&& handlerInput.requestEnvelope.request.intent.name === that.name;
}
retuns canHandle: [Function]
console.logapproch you always can use thedebuggermagic word for real debugging