Created
May 29, 2017 15:40
-
-
Save wyeo/691d0b22b902a6b979c87cb2b85359f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const btn = document.getElementById('btn') | |
const values = [1, 2, 3, 4, 5] | |
function logger(event) { | |
console.log(`Logger : ${event}`) | |
btn.removeEventListener('click', logger) | |
} | |
// btn.addEventListener('click', logger) | |
// const btn$ = Rx.Observable.fromEvent(btn, 'click') | |
// values.forEach(logger) | |
// btn$.subscribe(logger) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment