delay promise without engaging with that setTimeout thing
function delay(ms) { return new Promise((res, rej) => { setTimeout(() => res(), ms); }) }
const delay = t => new Promise(r => setTimeout(r, t))
Обсуждают сегодня