/**
* Sleep pause.
*
* @param {Number} time The time in milliseconds.
* @return {Promise<void>}
*/constsleep=(time)=>newPromise((resolve)=>{setTimeout(resolve,time)})
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Discussion on: 24 modern ES6 code snippets to solve practical JS problems
Replies for: they behave the same, but you don't have to create new variables for the same functionality throughout your app. if I assign setTimeout that wil...
For further actions, you may consider blocking this person and/or reporting abuse