Skip to content

Instantly share code, notes, and snippets.

@sunpietro
Created December 14, 2023 15:52
Show Gist options
  • Select an option

  • Save sunpietro/e889d254b2ae76cc04eaa2ee85acbcc1 to your computer and use it in GitHub Desktop.

Select an option

Save sunpietro/e889d254b2ae76cc04eaa2ee85acbcc1 to your computer and use it in GitHub Desktop.

Revisions

  1. sunpietro revised this gist Dec 14, 2023. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion delay.js
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,6 @@ const delay = async () => {
    });

    return delayPromise;
    };
    };

    // await delay();
  2. sunpietro created this gist Dec 14, 2023.
    7 changes: 7 additions & 0 deletions delay.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    const delay = async () => {
    const delayPromise = new Promise((resolve) => {
    setTimeout(resolve, 20000);
    });

    return delayPromise;
    };