Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.6/rx.all.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var intervalUpdateS = new Rx.Subject();
var observable = intervalUpdateS.startWith(500).flatMapLatest(function(intvl){
  return Rx.Observable.interval(intvl);
})
.map (function (data) { return "Hello World " + data; });
observable.subscribe(function (msg) {
  console.log(msg);
});
setTimeout(function () {
  intervalUpdateS.onNext(3000)
}, 3000);
Output

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

Dismiss x
public
Bin info
johnsonjo4531pro
0viewers