Last active
March 1, 2016 05:27
-
-
Save shuding/7917f1eedc5a2f5cfdf2 to your computer and use it in GitHub Desktop.
Isn't this beautiful?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $=(f,c,t,r)=>(r=(t=t||f()).next()).done?c&&c(r.value):setTimeout(()=>$(f,c,t),r.value); | |
$(function *() { | |
console.log(1); | |
yield 1000; | |
console.log(2); | |
yield 1000; | |
console.log(3); | |
yield 1000; | |
return 4; | |
}, function (res) { | |
console.log('result = ', res); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment