Tuesday, February 19, 2013

Javascript Basics Tutprial Part 5: Self Calling Or Immediate function.

Lets look at syntax representation of Self calling or Immediate function call.

Method 1
(
        function ()
       {
             something;
       }
)
( ) ;//This is self fn call

Method 2

(
      function ()
     {
          something;
      }

      ( )
) ;

Method 3
(
function  Anything()
{
something;
}

( )
) ;

The only difference is ( ) is inside or outside in the example above.
Chapter 5



Output

 

No comments :