Skip to content

Instantly share code, notes, and snippets.

@Mefistophell
Created October 26, 2024 15:56
Show Gist options
  • Save Mefistophell/34c33dccf7249c8625224ead10f4a56d to your computer and use it in GitHub Desktop.
Save Mefistophell/34c33dccf7249c8625224ead10f4a56d to your computer and use it in GitHub Desktop.

Revisions

  1. Mefistophell created this gist Oct 26, 2024.
    16 changes: 16 additions & 0 deletions tasks_log.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    const promise = new Promise((resolve, reject) => {
    console.log(1);
    setTimeout(() => {
    console.log("timerStart");
    resolve("success");
    console.log("timerEnd");
    }, 0);
    console.log(2);
    });

    promise.then((res) => {
    console.log(7);
    console.log(res);
    });

    console.log(4);