How to pause or make your code sleep for a specific time in javascript

Опубликовано: 31 Октябрь 2024
на канале: Build Cool Stuffs
141
4

How to pause or make your code sleep in javascript
This video was inspired by Python time module when i was working with time.sleep(number_of_seconds) in python,

then i asked myself, is there a way to do this in javascript? to write an inline code to pause or cause the code to sleep for some number of seconds or minutes,

then i came up with a trick on how to do the same in javascript

what do you think about this video? put it in the comment section

please support me by subscribing to my YouTube channel



buy me a coffee
https://www.buymeacoffee.com/paulosab


if you like this video don't forget to give it a thumb up

Link to files used in the video on GitHub
https://github.com/paulosabayomi/how-...

OR

clone it on the command line interface with git (if you have git install)

git clone https://github.com/paulosabayomi/how-...

#javascript #async #await #promise