1 2 3function indexOf(array, object) 4{ 5 for (var i = 0; i < array.length; i++) 6 if (array[i] == object) return i; 7 return -1; 8} 9 10function without(array,value) { 11 var res = Array(); 12 for( var i = 0 ; i < array.length; i++) 13 { 14 if (array[i] != value) res.push(array[i]); 15 } 16 return res; 17} 18