Created
December 20, 2017 15:16
-
-
Save jooyunghan/1c5ddd87180c21addc46c3903c518d3e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
async function consume(obs) { | |
for await (const n of obs) { | |
console.log(n); | |
if (n >= 5) break; | |
} | |
} | |
consume(Observable.interval(100)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment