Skip to content

Instantly share code, notes, and snippets.

@gistrec
Last active August 9, 2020 14:57
Show Gist options
  • Save gistrec/7817cb088dc40d1288b1825b81d2723d to your computer and use it in GitHub Desktop.
Save gistrec/7817cb088dc40d1288b1825b81d2723d to your computer and use it in GitHub Desktop.

app.js

require('./second');
require('./first');

second.js:

run = async function() {
    console.log('second::run') ;

    setTimeout(run, 1000);
}

setTimeout(run, 1000);

first.js

run = async function() {
    console.log('first::run');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment