skip to Main Content

Javascript – Nested Promises Execution Order

I was reading about nested promises and encountered this coding challenge in the tutorials. Can someone explain the execution order of this code? new Promise((resolve) => { new Promise((res) => { console.log("c"); resolve(3); res(2); }).then((response) => console.log(response)) }).then((res) => console.log(res));…

VIEW QUESTION

Javascript – Return Promise on a callback function

I'd like to return a Promise on a spĂ©cific function that is not async. The result is undefined when I call the function. My code : async function _callAccessControl(response, rpaReservation) { if (rpaResource.access_control_identifier && !accessControlExist) { return soap.createClientAsync('https://ipevia.com/public/files/onvif/credential.wsdl', { endpoint:…

VIEW QUESTION
Back To Top
Search