What is the use of different types of function call in js?

Posted by sparrow on Stack Overflow See other posts from Stack Overflow or by sparrow
Published on 2010-03-29T19:03:14Z Indexed on 2010/03/29 19:13 UTC
Read the original article Hit count: 127

Filed under:

I have seen different type of js function call like

function aTestFunction(param)
{
    // function body
}

and also:

aTestFunction = function(param)
{
   // function body
}

what is the difference in above to implementaion? Also, i found that jquery/prototype js framework uses the second implementation in most cases. Is there any special reason for that?

Sorry, I am a novice so this question may be silly to someone but will be helpful me if any guru out there helps me with this silly question. Thanks in advance.

© Stack Overflow or respective owner

Related posts about JavaScript