Welcome to our website.

Discover all latest seo tips and latest search engine update.

Friday, 29 August 2014

JavaScript Self Invoking Function Run Without Declare Name To Save Memory

function (){ alert("hello"); }; Run this Code Syntax Error: function statement requires a name function (){ alert("hello"); }(); Compose this code in bracket ( ); as any code expression can be written like c = (a+b); or c= a+b; so, (function (){ alert("hello"); }); Run Output: function() ///Success Now Run this code just after declaration using ( ); after code like- (function (){ alert("hello"); })(); Run Popup "hello" So you can save memory because not defining variable name for this function....