欢迎来到码农权的博客 MaNongGeGe.|

随笔分类 -  Js设计模式

Js继承之圣杯模式
摘要:圣杯模式 圣杯模式的核心就是拿一个空的构造函数去当中间人,解决组合模式的缺陷。 举个例子 function Person(name, age) { this.name = name??""; this.age = age??""; }; Person.prototype.say = function
21
0
0
Js继承之组合模式
摘要:组合模式 前置知识 原型 原型链 apply 举个例子 function Person(name, age) { this.name = name??""; this.age = age??""; }; Person.prototype.say = function () { console.log
3
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起
  1. 1 不将就 码农权
  2. 2 Bleeding Love 码农权
  3. 3 想你念你 码农权
Bleeding Love - 码农权
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.

Not available