Welcome to the GEEK world, best place where you find topic about latest cutting edge technology on website and mobile. Learn and grow your knowledge with the information and tutorials about Website designing, CSS tutorials, Java Script tutorials, Ruby tutorials, ROR tutorials, HTML tutorials, HTML5 , JQuery, Javascript tutorials, Photoshop tutorials, Flash, games tutorials, Cheat sheets, Design tools, Action Scripts as well as MySql, Oracle and many more in a easy way to use and understand.
Friday, September 5, 2014
Javascript: Introduction to Anonymous functions
Anonymous functions are functions that are dynamically declared at runtime that don’t have to be given a name.
Anonymous functions are declared using the function operator. You can use the function operator to create a new function wherever it’s valid to put an expression. For example you could declare a new function as a parameter to a function call or to assign a property of another object.
Example of a non-anonymous function:
function dosomething(){
var b = 3;
a += b;
return a;
}
Subscribe to:
Posts (Atom)