Created
December 18, 2017 23:42
-
-
Save ZenabKhan/703600fc9ce9af54654b03cab097318e to your computer and use it in GitHub Desktop.
// source https://jsbin.com
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/5.5.5/Rx.js"></script> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
// Creates an observable sequence of 5 integers, starting from 1 | |
var source = Rx.Observable.range(1, 5); | |
// Prints out each item | |
var subscription = source.subscribe( | |
function (x) { console.log('onNext: ' + x); }, | |
function (e) { console.log('onError:' + e); }, | |
function () { console.log('onCompleted'); }); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">// Creates an observable sequence of 5 integers, starting from 1 | |
var source = Rx.Observable.range(1, 5); | |
// Prints out each item | |
var subscription = source.subscribe( | |
function (x) { console.log('onNext: ' + x); }, | |
function (e) { console.log('onError:' + e); }, | |
function () { console.log('onCompleted'); });</script></body> | |
</html> |
This file contains 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
// Creates an observable sequence of 5 integers, starting from 1 | |
var source = Rx.Observable.range(1, 5); | |
// Prints out each item | |
var subscription = source.subscribe( | |
function (x) { console.log('onNext: ' + x); }, | |
function (e) { console.log('onError:' + e); }, | |
function () { console.log('onCompleted'); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment