Skip to content

Instantly share code, notes, and snippets.

View achimbode's full-sized avatar

Achim Bode achimbode

  • Berlin, Germany
View GitHub Profile
@achimbode
achimbode / async.js
Created December 1, 2017 10:02 — forked from arol/async.js
Asynchronicity exercise
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