DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: Where’s the Sleep Function in JavaScript?

Collapse
danielescoz profile image
Daniel Escoz

Functions can define their own promisified version using a symbol, which is what setTimeout does in Node.js

So yes, it works.

Thread Thread
aumayeung profile image
John Au-Yeung Author

That makes sense. Good to know if we're using Node.js