08 2019 档案

摘要:首先你要了解设计模式,了解备忘录模式,如果不了解那就先去了解吧. class Cache { // 中间对象 constructor(json) { this.json = json } getJson() { return this.json } } class CacheList { // 缓存 阅读全文
posted @ 2019-08-24 20:05 国服第一李师师 阅读(231) 评论(1) 推荐(0) 编辑
摘要:function getRndInteger(min, max) { return Math.floor(Math.random() * (max - min)) + min; } getRndInteger(1,32) function getRndInteger(min, max) { retu 阅读全文
posted @ 2019-08-08 11:04 国服第一李师师 阅读(1163) 评论(0) 推荐(0) 编辑
摘要:对象里的属性求和var result = [ { subject: 'math', score: 10 }, { subject: 'chinese', score: 20 }, { subject: 'english', score: 30 } ]; var sum = result.reduce 阅读全文
posted @ 2019-08-05 15:04 国服第一李师师 阅读(541) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示