This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const randomNumber = () => { | |
return Math.random(); | |
} | |
// 1. Make it wait for 1 sec. with `setTimeout` | |
const timeoutRandomNumber = () => { | |
} | |
// 2. Now wrap the timeout version to work with promises |