Question related to EcmaScript:
const firstArg = 'myArg';
this._myFunction(firstArg)
.then((asyncResponse) => this._secondMethod(asyncResponse))
.then((asyncSecondResponse, asyncResponse) =>
this._thirdMethod(asyncSecondResponse, asyncResponse))
.then(() => this._lastMethod());
The problem is:
How to pass to the to the _thirdMethod
2 arguments (one from this._secondMethod(asyncResponse))
- that gives one argument and second is just previous asyncResponse
) - I don’t want to define it inside _secondMethod(asyncResponse) to return these two arguments, just want to do it in this PIPE that I wrote above
Is there any syntax for it?