# # Introduction to Reactive Programming
_By André Staltz_


You've probably been hearing this word recently. Reactive Programming has you curious, and you want to dig in and start learning what it is all about.
What's the most difficult aspect of Reactive Programming? Thinking Reactive!
In this series, we will discover what it means to think Reactive through RxJS. We will exercise our minds, and let go of our old imperative and stateful habits of programing.
If you are brand new to reactive programming, watch this series first.
body {
    font-family: sans-serif;
    padding: 10px;
.button {
  background: #EcEcEc;
  padding: 5px;
  text-decoration: none;
  color: black;
  border: 1px solid darkgray;
h4 {
    font-weight: bold;
    display: inline-block;
    margin-left: 20px;
.header {
    /*background: #ECECEC;
    */padding: 5px;
<!DOCTYPE html>
    <link rel="stylesheet" href="app.css">
  <meta charset="utf-8">
<div class="header">
         <a href="#" class="button">BUTTON</a><h4>-</h4>
    <script src="https://unpkg.com/rxjs@5.4.3/bundles/Rx.min.js"></script>
    <script src="script.js"></script>
var button = document.querySelector('.button');
var label = document.querySelector('h4');

var clickStream = Rx.Observable.fromEvent(button, 'click');

var doubleClickStream = clickStream
  .bufferWhen(() => clickStream.debounceTime(250))
  .map(arr => arr.length)
  .filter(len => len === 2);

doubleClickStream.subscribe(event => {
  label.textContent = 'double click';

  .subscribe(suggestion => {
    label.textContent = '-';