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.1/dist/global/Rx.js"></script>
</head>
<body>
</body>
</html>
 
const Observable = Rx.Observable;
function GetCategories() {
    return Observable.timer(1000).do(() => console.log('GetCategories()'));
}
function GetCartItems() {
    return Observable.timer(1000).do(() => console.log('GetCartItems()'));
}
console.log('start...');
GetCategories()
  .concatMap(() => GetCartItems())
  .subscribe(() => console.log('done'));
Output

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

Dismiss x
public
Bin info
martinsikpro
0viewers