What is the difference between below statement?

var func = function() {}
function func() {}

 Posted by vishalneeraj-24503 on 1/15/2014 | Category: JavaScript Interview questions | Views: 797 | Points: 40
Answer:

var func = function() {} -> Defines a variable that references an anonymous function.

function func() {} -> Defines a named function "func".


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response