В console.log
я получил вывод на объект canHandle: [Function: canHandle]
и в секунду canHandle: [Function]
.Какая разница между?
const SessionEndedRequest = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'SessionEndedRequest';
}
};
возвращает canHandle: [Function: canHandle]
и
obj = {};
obj.canHandle = function (handlerInput) {
return handlerInput.requestEnvelope.request.type === that.type
&& handlerInput.requestEnvelope.request.intent.name === that.name;
}
retuns canHandle: [Function]