Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created Jan 9, 2018
Embed
What would you like to do?
function delay(x, f) {
setTimeout(function() {
f(x);
}, 2000);
}
function main() {
delay(10, function(x) {
console.log(x);
delay(20, function(y) {
console.log(y);
});
});
}
main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment