Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
👷 fix typo
- Loading branch information
Showing
1 changed file
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
|
||
sleep = (ms) { | ||
sleep = (ms) => { | ||
return new Promise(r => setTimeout(r, ms)) | ||
}, | ||
}; | ||
|
||
delay(100 ) | ||
.then(function STEP2(){ | ||
console.log("step 2 (after 100ms)"); | ||
return delay(200 ); | ||
}) | ||
.then(function STEP3(){ | ||
console.log("step 3 (after another 200ms)" ); | ||
}) | ||
.then(function STEP4(){ | ||
console.log("step 4 (next Job)"); | ||
return delay( 50 ); | ||
}) | ||
.then(function STEP5(){ | ||
console.log("step 5 (after another 55ms)" ); | ||
}) | ||
sleep(100) | ||
.then(function STEP2 () { | ||
console.log("step 2 (after 100ms)"); | ||
return sleep(200); | ||
}) | ||
.then(function STEP3 () { | ||
console.log("step 3 (after another 200ms)"); | ||
}) | ||
.then(function STEP4 () { | ||
console.log("step 4 (next Job)"); | ||
return sleep(50); | ||
}) | ||
.then(function STEP5 () { | ||
console.log("step 5 (after another 50ms)"); | ||
}) |