js函数

                                                              

声明式:
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')
posted @ 2019-12-06 12:00  咖喱小丸子  阅读(100)  评论(0编辑  收藏  举报