Skip to content

Instantly share code, notes, and snippets.

@codemilli
Last active July 31, 2016 17:07
Show Gist options
  • Save codemilli/f60d7064fa746dae215f229d474e2e9a to your computer and use it in GitHub Desktop.
Save codemilli/f60d7064fa746dae215f229d474e2e9a to your computer and use it in GitHub Desktop.
var PromiseArray = [];
el.addEventListener('scroll', function(e) {
PromiseArray.push(new Promise(...));
forEachForPromise();
});
function forEachForPromises() {
PromiseArray.filter(function(promise) {
promise.then(function(data) {
if (...) {}
});
return ???;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment