function so(){console.log(`inside the timer`)}
function* sogen()
{
const callback = yield;
setTimeout(callback, 2000);
return 1;
}
function(){
var gen = sogen();
gen.next(so), gen.next(so);
}()
Why am I never reaching function so?
from Why does `setTimeout` doesn't work when callback is passed via yield?
No comments:
Post a Comment