Return to Snippet

Revision: 24951
at March 16, 2010 15:43 by toddaeverett


Initial Code
// create "Array.indexOf" function in IE
if(!Array.prototype.indexOf){
    Array.prototype.indexOf=function(obj,start){
        for(var i=(start||0),j=this.length;i<j;i++){
            if(this[i]==obj){return i;}
        }
        return -1;
    }
}

Initial URL

                                

Initial Description

                                

Initial Title
create "array.indexOf" function in IE

Initial Tags

                                

Initial Language
JavaScript