Created
January 6, 2012 08:16
-
-
Save psiborg/1569645 to your computer and use it in GitHub Desktop.
JS Dynamic Function
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
// creating a function with a dynamic function body | |
var Product = new Function("x", "y", "return x*y;"); // avoid unless you have to because it uses eval on 3rd arg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment