Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math| let timeout = 1000; | |
| /** | |
| * Create a custom observable that creates a XHR request and returns complete when the promise is fulfilled | |
| */ | |
| let observable = Rx.Observable.create((o) => { | |
| dataService.fetch('test.json') | |
| .then((data) => { | |
| o.onNext(data); | |
| o.onCompleted(); |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math