Created
July 20, 2011 18:39
-
-
Save gtzilla/1095598 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
* | |
* setTimeout can take more than 2 arguments. args > 2 will be passed to method in arg position 1 | |
* setTimeout(myMethod, 10, "one", { "foo" : "bar" } | |
* | |
* */ | |
function myMethod( param1, param2 ) { | |
console.log(arguments); | |
} | |
// myMethod will get "one" and {"foo":"bar"} passed in as args | |
setTimeout( myMethod, 1, "one", {"foo":"bar"} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment