Function Hoisting

The function declaration is been mentioned first and not the function expression.
Example:

calling(); //calling

function calling(){

      alert("calling");

}

calling(); //Type Error calling is not a function.

var calling = function(){

     alert("calling");

};

No comments:

Post a Comment

Overview of AngularJS

AngularJS is an open source web application framework. It is now maintained by Google . The most of the code can be eliminated by using th...