1, function name (function name)
function fn() {
...
}
2, function expressions (anonymous function)
var f=function() {
...
}
3, new Function ( 'parameter 1', '2 form number', 'function body')
var f=new Function('a','b','console.log(a+b)'); //定义函数
f(1,2); //调用函数
Therefore a conclusion can be drawn: All functions are examples Function, meaning that all functions are an object , as shown below