/**
* 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.
if I assign
setTimeout
that will force me to create new unnecesary variables in the entire app? And that doesn't happen if I wrap it in a function?