Skip to content

Instantly share code, notes, and snippets.

@marceloandrader
Last active May 14, 2024 02:29
Show Gist options
  • Select an option

  • Save marceloandrader/a73b5d11bc94d88a30c4 to your computer and use it in GitHub Desktop.

Select an option

Save marceloandrader/a73b5d11bc94d88a30c4 to your computer and use it in GitHub Desktop.
Functions are objects
// you can create a function by passing the
// Function constructor a string of code
var func_multiply = new Function("arg1", "arg2", "return arg1 * arg2;");
func_multiply(5,10); // => 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment