• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

The difference in writing a jquery statement as a "var functionName = function" compared to:

Hi,
   When coding in jquery SPA what is the difference between:

     var functionName = function(){};

                    or
writing it:

      function functionName(){};



Thanks,
Keith
0
Black_Trash
Asked:
Black_Trash
  • 2
1 Solution
 
Michel PlungjanIT ExpertCommented:
The main difference is that the first version is defined at run time whereas the second when the line is parsed.

Hare is a good rundown

http://kangax.github.io/nfe/
0
 
Black_TrashAuthor Commented:
Thanks for the link to the doc.

I get mixed up when to build them one way or the other.

Merry Christmas!!!!
0
 
Michel PlungjanIT ExpertCommented:
YW and to you too
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now