?
Solved

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

Posted on 2013-12-12
3
Medium Priority
?
305 Views
Last Modified: 2013-12-13
Hi,
   When coding in jquery SPA what is the difference between:

     var functionName = function(){};

                    or
writing it:

      function functionName(){};



Thanks,
Keith
0
Comment
Question by:Black_Trash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 900 total points
ID: 39717288
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
 

Author Closing Comment

by:Black_Trash
ID: 39717357
Thanks for the link to the doc.

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

Merry Christmas!!!!
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 39717370
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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question