JavaScript functions are different from other languages. Each function is maintained and run as an object. Through the properties of function objects, you can easily assign a function to a variable or pass the function as a parameter. Before continuing, let’s take a look at the syntax of using functions:
The following is a quotation fragment:
function func1(…){…}
var func2=function(…){…};
var func3=function func4(…){…};
var func5=new Function();