Function Declaration vs Function Expression
You guys several times will have seen the function in two syntax.
1)Function Declaration
- (adsbygoogle = window.adsbygoogle || []).push({});
-
- .............
- ...........
- }
2)Function Expression
- var func_name;
- func_name=function(){
- ....................
- .............
- };
-
Here are the differences
- Function expression can’t be called before its definition vs Function declaration can.