Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergi Tur Badenas acacha

View GitHub Profile
@acacha
acacha / wait.js
Created Nov 15, 2017 — forked from ericelliott/wait.js
Wait -- an ES6 promise example
View wait.js
const wait = time => new Promise((resolve) => setTimeout(resolve, time));
wait(3000).then(() => console.log('Hello!')); // 'Hello!'