Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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…
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
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.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

770 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