声明式:function fn() { //do something }
函数表达式:
let fn = function () { //do something }构造函数:
function Person(name,age){ this.name=name this.age=age } let fn = new Person('syq','18')