console
const { interval, combineLatest, timer, fromEvent } = rxjs;
const { mapTo, startWith, scan, tap, map } = rxjs.operators;
const observable1 = interval(1000);
const observable2 = interval(1000);
const observable3 = interval(1000);
const combine = combineLatest(observable1, observable2, observable3);
const timeOne = timer(1000, 3000);
const timeTwo = timer(2000, 3000);
const timeThree = timer(3000, 3000);
const combine1 = combineLatest(timeOne, timeTwo, timeThree, (one, two, three) => {
return `one is ${one}, two is ${two}, three is ${three}`;
});
const setHtml = id => val => (document.getElementById(id).innerText = val);
<h5>样例3</h5>
<div>
<button id='red' class="btn btn-danger">Red</button>
<button id='black' class="btn btn-primary">Black</button>
</div>
<div>Red: <span id="redTotal"></span> </div>
<div>Black: <span id="blackTotal"></span> </div>
<div>Total: <span id="total"></span> </div>