This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Q = require('q'); | |
promise1(2).then(function (d) { | |
return promise2(d) | |
}).then(console.log,console.log) | |
function promise1 (d){ | |
var def = Q.defer(); | |
if(d===1){ | |
def.resolve('resuelto promise1') |
NewerOlder