Created
July 17, 2009 00:36
-
-
Save k1LoW/148778 to your computer and use it in GitHub Desktop.
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 Hoge={ | |
one:function (str){ | |
setTimeout(function(){ console.log(str); },0); | |
return this; | |
}, | |
two:function (str){ | |
this.cancel_id = setTimeout(function(){ console.log(str);console.log(str); },0); | |
return this; | |
}, | |
three:function(str){ | |
setTimeout(function(){ console.log(str); },0); | |
clearTimeout(this.cancel_id); | |
return this; | |
} | |
}; | |
Hoge.one('a').two('b').three('c');//>ac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment