Skip to content

Instantly share code, notes, and snippets.

@rshivkumar95
Last active July 4, 2019 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rshivkumar95/b972ebcd9c9341306b2f7ebf3bb94bf7 to your computer and use it in GitHub Desktop.
Save rshivkumar95/b972ebcd9c9341306b2f7ebf3bb94bf7 to your computer and use it in GitHub Desktop.
JS Bin// source https://jsbin.com/kikinoy
function promissDemo(){
new Promise(function(resolve, reject){
setTimeout(function(){
console.log('200');
resolve()
}, 200);
}).then(function(fromResolve){
setTimeout(function(){
console.log('100');
//resolve('hello')
}, 100);
});
}
promissDemo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment