Lanchouchou
Lanchouchou
``` Array.prototype.myIndexOf = function(target,fromIndex){ if(!Array.isArray(arr)){ throw new Error('this is not a array') } fromIndex = fromIndex || 0 for(let i=0;i=fromIndex){ return i } } return -1 } ```
> 我不理解,修改后的版本,this.value不还是输出undefined吗... 返回undefined 才是对的,修改之前的版本返回的是1,使用new 调用 this 应该是指向新创建的对象 undefined 才是对的~
get请求参数的长度限制是 由浏览器和web服务器 对 URL 限制导致的,而不是 对参数的限制,不同浏览器限制长度不一样。