Classified Sites List Classified Sites List List of Making Back-links

1. Australia Classified Sites

2. Canada Classified List

3. UK Classified Sites

4. USA Classified Sites List

1. UAE Classified Sites List

2. Indian Classified Sites List

3. Pakistani Classified Sites List

4. Bangladeshi Classified Sites List

1. High PR Do-follow Guest Posting Sites list

2. 20 High PR Social Networking Site List 2016

3. PR-5 Do Follow Social Bookmarking Site list 2016

4. Do-follow Social Bookmarking Website list 2016

5. 100 High Page Rank Do-follow Social Bookmarking lists 2016

6. Directories Submission Sites List

7. Articles Submission Sites List

Differentiate declaration syntax: function fn() {} vs var fn = function() {} in JavaScript

In the post i discuss why programmers use of function fn() {} and var fn = function() {} in JavaScript?  What is difference between these two functions and pros & cons of using the functions. The problem you face when you reuse or optimize the code of another developer, you get confuse why he used function fn() {} in one place and var fn = function() {} in another line of code, after reading the post you get better idea of these two functions.

 var fn = function() {} is a function expression while function fn() {} is a function declaration  and it is define when script is executed.

Example of function expression.

// TypeError: undefined is not a function

  var functionexp = function() {

Example of function declaration.

 // Outputs: “Hello!”

  function functiondec() {

Another difference of function expression and function declaration, are you can not add function declaration in conditional statements (if, if else, switch etc) of JavaScript. if you want to use function in conditional statement use “use strict” in the function or start of the JavaScript file. More about strict mode.

About Moazzam Qureshi

I am SEO expert and web developer since 2011. My hobby is to write & provides quality content about blogging, SEO , Social Media , Earn Online and Affiliate Marketing.