RxJS - Observables, Observer & Subscription

Understand what Observables, Operators and Subscriptions are

by Shital Agarwal

HTML

<script src="https://unpkg.com/@reactivex/[email protected]/dist/global/Rx.js"></script>

JavaScript

var observable = Rx.Observable.of(1,2,3,4,5);

observable
.scan((total, currentValue) => {
	return total + currentValue;
}, 0)
.subscribe({
	next: function(value) {
  	console.log(value);
  }
});