I use JS generator to yield a value in a callback of setTimeout:
setTimeout
function* sleep() { // Using yield here is OK // yield 5; setTimeout(functio