-
-
Save yuizho/833420abfff3766ce399d035808c2c6a to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/nepoja
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"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.1.0/rx.lite.js"></script> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
'use strict'; | |
var subject = new Rx.Subject(); | |
subject.subscribe(function (n) { | |
return console.log(n); | |
}, null, function () { | |
return console.log('completed'); | |
}); | |
subject.onNext(1); | |
subject.onNext(2); | |
subject.onCompleted(); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var subject = new Rx.Subject(); | |
subject.subscribe( | |
(n) => console.log(n), | |
null, | |
() => console.log('completed') | |
); | |
subject.onNext(1); | |
subject.onNext(2); | |
subject.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
'use strict'; | |
var subject = new Rx.Subject(); | |
subject.subscribe(function (n) { | |
return console.log(n); | |
}, null, function () { | |
return console.log('completed'); | |
}); | |
subject.onNext(1); | |
subject.onNext(2); | |
subject.onCompleted(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment