Last active
August 29, 2015 14:03
-
-
Save JosePedroDias/0a67d7a815df531ba121 to your computer and use it in GitHub Desktop.
performant arguments handling
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 ctx = this; // this can be skipped if you don't care about the context | |
var argsL = arguments.length; | |
var args = new Array(argsL); // optimizable arguments-to-array | |
for(var i = 0; i < argsL; ++i) { | |
args[i] = arguments[i]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment