Lines Matching refs:array
28 var array = [1,2,3,1,2,3,1,2,3,1,2,3];
31 // Array.prototype.indexOf.
36 assertEquals(array.indexOf(4), -1);
37 assertEquals(array.indexOf(3, array.length), -1);
39 assertEquals(array.indexOf(3), 2);
41 assertEquals(array.indexOf(1, -17), 0);
43 assertEquals(array.indexOf(1, -11), 3);
45 assertEquals(array.indexOf(1, 1), 3);
46 assertEquals(array.indexOf(1, 3), 3);
47 assertEquals(array.indexOf(1, 4), 6);
50 // Array.prototype.lastIndexOf.
55 assertEquals(array.lastIndexOf(1, -17), -1);
57 assertEquals(array.lastIndexOf(1), 9);
59 assertEquals(array.lastIndexOf(1, array.length), 9);
61 assertEquals(array.lastIndexOf(1, 2), 0);
62 assertEquals(array.lastIndexOf(1, 4), 3);
63 assertEquals(array.lastIndexOf(1, 3), 3);
65 assertEquals(array.lastIndexOf(1, -11), 0);