Skip to content

Instantly share code, notes, and snippets.

View thorstenweber83's full-sized avatar

Thorsten thorstenweber83

View GitHub Profile
@thorstenweber83
thorstenweber83 / 37-http-async-await.js
Last active August 15, 2016 09:18
Exercise 37: Sequencing HTTP requests with Observable: async await version
// this is an implementation of exercise 37 of
// http://reactivex.io/learnrx/
// to compare with the Observable implementation
// i assume that getJSON returns a Promise instead of an Observable...
function load(){
return new Promise(function(resolve,reject){
window.onload = resolve;
});
}