jsCodeWar 多函数嵌套调用
摘要:function compose(f, g) { return function() { return f(g.apply(this, arguments)); }; } function compose(f,g) { return function(...a) { return f(g(...a)
阅读全文
数组prototype添加函数呢,采用回调判定函数内容
摘要:1、解决方案 Array.prototype.all = function (p) { return this.filter(p).length == this.length; }; Array.prototype.none = function (p) { return this.filter(p
阅读全文