Code to promisify setTimeout
const delay = (time) => new Promise((resolve, reject) => setTimeout(resolve, time))
Usage
delay(2000).then(() => console.log('Hello i will get logged after 2 second(s)'))
For further actions, you may consider blocking this person and/or reporting abuse
Agbo, Daniel Onuoha -
Le Quan Phat -
Marceli Borowczak -
Sanjay M. -
Top comments (0)