Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://npmcdn.com/@reactivex/rxjs@5.0.0-beta.1"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var source = Rx.Observable.interval(1000)
    .take(3)
    .do(function (x) {
        console.log('some side effect ...');
    })
    //.share(); uncomment magic line
source.subscribe((n) => console.log("subscriptor 1 = " + n));
source.subscribe((n) => console.log("subscriptor 2 = " + n));
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
jhadespro
0viewers