![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
设计模式
洛神赋在csdn
这个作者很懒,什么都没留下…
展开
-
奇葩说 构造函数模式出现的问题
function Campus(location, name) { this.location = location; this.name = name; this.information = function() { return this.location + ", " + this.name; } } var aaa = new Campu...原创 2018-07-23 08:59:41 · 132 阅读 · 0 评论 -
理解原型模式的缺陷以及理解对象相等的确切含义
function Campus(location, name) { this.location = location; this.name = name; this.information = information; } function information() { return this.location + ", " + this.name; } v...原创 2018-07-23 09:24:14 · 153 阅读 · 0 评论 -
JavaScript原型模式
function Campus(location, name) { this.location = location; this.name = name; } Campus.prototype.information = function() { console.log(this.location + ', ' + this.name); } var aaa = ne...原创 2018-07-23 09:47:53 · 243 阅读 · 0 评论 -
JavaScript继承总结笔记
//原型链 //借用构造函数模式 //组合模式 //原型式继承 function SubType() { this.language = 'JavaScript'; } function SuperType() { this.welldone = 'DataBase'; this.projects = ['operation', 'algorithm']; } Object.de...原创 2018-09-07 10:26:16 · 299 阅读 · 0 评论