I want to clarify the 'this' within a promise then()
or catch()
function scope. Ex:
//this= 1
this.promiseFunction("id1").then(
(response) => {
//this = 2
//what is 'this' here ?
}).catch(() => {
//this = 3
//what is 'this' here ?
});
Is 'this' referred by 1 and 2 are equal? How does that happen?