<!DOCTYPE html>
<html>
<head>
<script data-require="rxjs@5.0.0-beta.7" data-semver="5.0.0-beta.7" src="https://npmcdn.com/rxjs@5.0.0-beta.7/bundles/Rx.umd.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<h1>Create Observable</h1>
<button>Click me</button>
</body>
</html>
// Code goes here
window.onload = function() {
var input = document.querySelector('button');
var observable = Rx.Observable.fromEvent(input, 'click');
observable.subscribe((event) => {
console.log('Observable: ', event);
});
input.addEventListener('click', (event) => {
console.log('Event listener: ', event);
});
}
/* Styles go here */