摘要:
Function.prototype.bind=function(ctx,...lastArgs){ let self=this return (...laterArgs)=>self.apply(ctx,lastArgs.concat(laterArgs)) } 阅读全文
摘要:
1:[...new Set(arr)] Array.from(new Set(arr)) 2: 阅读全文
摘要:
function deepClone(obj){ if(obj instanceof RegEpx) return new RegEpx(obj) if(obj instanceof Date) return new Date(obj) if(typeof obj !=='object') return obj let arr=Array.isArr... 阅读全文
摘要:
function New(fn,...args){ let obj={} obj.__proto__=fn.prototype let result=fn.apply(obj,args) if(typeof result==='object'||typeof result==='function'){ return result ... 阅读全文