Wednesday, March 25, 2015

JavaScript - The Function Object

A precise and specific descriptions of this distinctive feature of JavaScript.
Function in JavaScript is defined as an object (dictionary) with code that is an immutable string property. This makes JavaScript unusual and powerful. It just looks similar to other languages.

Just JavaScript - The Function Object:
function definition:
  var myFunction = new Function("a","b", "var ans=a+b; return ans;");
is equivalent to:
  var myFunction = function(a,b) { var ans=a+b; return ans; }
and function expression:
  function myFunction(a,b) { var ans=a+b; return ans; }

Just Javascript @ i-Programmer, in-depth tutorials for various programming languages

No comments: