You guys several times will have seen the function in two syntax.
1)Function Declaration
- function func_name(arg_1, arg_2,..., arg_n){
- .............
- ...........
- }
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.