Solved

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

Posted on 2013-12-12
3
302 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 225 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
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 +…

738 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