Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  <script src="https://unpkg.com/@reactivex/rxjs@5.0.3/dist/global/Rx.js"></script>
</head>
<body>
</body>
</html>
 
var clicks = Rx.Observable.fromEvent(document.querySelector('#button1'), 'click');
clicks.subscribe(function(){
  console.log(Math.Random());
})
var x = [1,2,3,4];
arrObs = Rx.Observable.from(x);
arrObs.map(function(x){
  return x*2;
}).subscribe(function(value){
  console.log(value);
});
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers