-
-
Save kavitshah8/4d259ecf7e9a6fbc51c1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Promise.resolve().then(function () { | |
return 100; | |
}) | |
.then(function() { | |
console.log(arguments); | |
}); | |
// --- | |
Promise.resolve(200).then(function () { | |
console.log(arguments); | |
return Promise.resolve(100); | |
}) | |
.then(function(arg1) { | |
console.log(arguments); | |
}); | |
// --- | |
Promise.resolve().then(function () { | |
return 100; | |
}).then(function () { | |
console.log('1', arguments); | |
}) | |
.then(function() { | |
console.log('2', arguments); | |
}); | |
// --- | |
Promise.resolve().then(function () { | |
return 100; | |
}) | |
.then(null) | |
.then(null) | |
.then(null) | |
.then(function() { | |
console.log(arguments); | |
}) | |
.then(null) | |
.then(function() { | |
console.log(arguments); | |
}); | |
// --- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment