摘要:
class 首先, 在JavaScript中, class类是一种函数 class User { constructor(name) { this.name = name; } sayHi() {alert(this.name);}}alert(typeof User); // function c 阅读全文
摘要:
方式一: 算法实现 function getThousand (numStr) { if (numStr.length < 4) return numStr; let len = numStr.length; let restLen = len % 3; // 千分位划分余下的位数 let arr 阅读全文
摘要:
1.call/apply Function.prototype.myCall = function (context, ...args) { if (typeof this !== 'function') return; var fun = this; context._fn = fun; // T 阅读全文