摘要: 匿名函数相关知识点 普通函数 function box(){ return 'Lee'; } alert(box()); 匿名函数 function(){ //单独的匿名函数无法运行,就算能运行也无法调用,因为没有名称 return 'Lee'; } alert(box()); //无法调用,因为没 阅读全文
posted @ 2018-05-18 20:50 江小-白 阅读(339) 评论(0) 推荐(0)
摘要: 1、原型链继承function Box(){ //被继承的函数叫做超类型(父类、基类) this.name='Lee';} function Desk(){ //继承函数叫做子类型(子类、派生类) this.age=100} function Table(){ this.level=1;} //通过 阅读全文
posted @ 2018-05-18 15:56 江小-白 阅读(110) 评论(1) 推荐(0)