Preparation Code Preparation HTML (this will be inserted in the <body>
of a valid HTML5 document in standards mode) (useful when testing DOM operations or including libraries) <script >
var ar = [0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 9 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ];
</script >
Setup JS Array .prototype .myio = function (search ) {
for (var i = 0 , _len=this .length ; i < _len; i++) {
if (this [i] == search) {return i}
}
return -1
}
Array .prototype .myio3 = function (search ) {
for (var i = 0 , _len=this .length ; i < _len; i++) {
if (this [i] === search) {return i}
}
return -1
}
Array .prototype .myio4 = function (search ) {
search = search.toString ()
for (var i = 0 , _len=this .length ; i < _len; i++) {
if (this [i].toString () === search) {return i}
}
return -1
}
Teardown JS