Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Async or sync resolution?
console.log(1);
new Promise(function(resolve,reject){
console.log(2);
resolve();
}).then(function(val){
console.log(3);
});
const Rx = require('rxjs');
let obs = Rx.Observable.create(sub => {
console.log(4);
sub.next();
});
obs = obs.map(v => {
console.log(5);
return 'foo';
});
obs.subscribe(v => {
console.log(6);
// 'foo'
});
console.log(7);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.