Created
January 4, 2022 21:53
-
-
Save maximLyakhov/4d0d4aaad4b8e3d2c695abd1fbd60aa9 to your computer and use it in GitHub Desktop.
The delay between each request.
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
const array = ["your", "response", "is", "here"]; | |
const interval = 1000; | |
array.forEach((el, index) => { | |
setTimeout(() => { | |
console.log(`Request ${index + 1}:`, el); | |
}, index * interval); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment