1.var f = new Function("a", "b", "return a+b")
2.var f2 = Function("a", "b", "return a+b")
f
and f2
both are a anonymous function. f(1,2)
and f2(1,2)
both returns 3
. So is there any actual internal difference between the two?
Does Function
internally return a function object? Difference from using the Function
as constructornew Function(...)
?