Skip to content

Instantly share code, notes, and snippets.

const randomNumber = () => {
return Math.random();
}
// 1. Make it wait for 1 sec. with `setTimeout`
const timeoutRandomNumber = (cb) => {
setTimeout(() => {
cb(null, randomNumber())
}, 1000);
}
@arol
arol / README.md
Created October 31, 2018 07:23
Node.js + Babel + TypeScript