SHARE
TWEET

Untitled

a guest Jan 16th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var obs1 = Rx.Observable.fromEvent(input1, 'input').map((e) => e.target.value);
  2. var obs2 = Rx.Observable.fromEvent(input2, 'input').map((e) => e.target.value);
  3. var obs3 = Rx.Observable.fromEvent(input3, 'input').map((e) => e.target.value);
  4.  
  5. var counter = 0;
  6.  
  7. Rx.Observable.combineLatest(obs1, obs2, obs3)          
  8.         .subscribe(([ res1, res2, res3 ]) => {
  9.   span.textContent = 'Result: ' + ++counter + ' -> ' + res1 +
  10.                     ' / ' +
  11.                     res2 +
  12.                     ' / ' +
  13.                     res3;
  14.         });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top