Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var func1 = function(){
- return new promise(function(resolve, reject){
- //some operations here
- });
- };
- var func2 = function(){
- promise.resolve(someFuncSync())
- .then(function(){
- //this is the old promise chain
- func1()
- .then(function(message,error){
- return message;
- //i want use this return value in old promise chain
- });
- console.log(message);
- //printing func1 returned message in old promise chain
- })
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement