Function Expression in Javascript

 Function Expression in Javascript

In this article we are goanna to see about Function Expression and where we use these. which is most important when you are going to start your career in JavaScript. Please ready and enjoy this article if you want to give any feedback about your experience, we welcome.



When we create a function and assign it to a variable that known as function expression.

Ex :

var myfunction = function fun(){

document.write(“Hello world”);

};

myfunction();

Ex :

myfunction();

var myfunction = function fun(){

document.write(“Hello world”);

};

Note:- 

You can’t call function expression before function definition.

Function expressions in Javascript are not hoisted, unlike function declarations


Share:

0 comments

Please leave your comments...... Thanks