Skip to content

Instantly share code, notes, and snippets.

View vsDizzy's full-sized avatar
🚐
Avoiding busification

vsDizzy

🚐
Avoiding busification
View GitHub Profile
@nybblr
nybblr / 1-easy.js
Last active July 13, 2022 03:40
3 examples of using Async Generators and Async Iteration in JavaScript!
// Create a Promise that resolves after ms time
var timer = function(ms) {
return new Promise(resolve => {
setTimeout(resolve, ms);
});
};
// Repeatedly generate a number starting
// from 0 after a random amount of time
var source = async function*() {