Solved

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

Posted on 2013-12-12
3
300 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I spend far too much time on the web keeping up with the news: politics, the environment, computer stuff, the Experts Exchange. It's never-ending. But many of the most informative web pages are overwhelmed with noise: scrolling banners, flashing tex…
Internet is a big network which is formed by connecting multiple small networks.It is a platform for all the users which are connected to it.Internet act as platform in different fields. Such as: Internet  as a collaboration platform. Internet  as…
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.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

821 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