JavaScript & DHTML - How to assign a function to a variable with the JavaScript Function contructor?
var add= new Function("x", "y", "return x + y"); It's absolutely similar to the following function declaration: function add(x,y) { return x+y; }
Category: | JavaScript & DHTML |
<< Go back