Home | History | Annotate | Download | only in Array

Lines Matching defs:obj

127 var obj = new Object();
128 obj.sort = Array.prototype.sort;
129 obj.length = 4;
130 obj[0] = 0;
131 obj[1] = 1;
132 obj[2] = 2;
133 obj[3] = 3;
135 actual = obj.sort(cmp).length;
142 * above, the setting of obj.length to 2 and then 4
145 obj = new Object();
146 obj.sort = Array.prototype.sort;
147 obj.length = 4;
148 obj[0] = 3;
149 obj[1] = 2;
150 obj[2] = 1;
151 obj[3] = 0;
153 obj.sort(cmp); //<---- this is what triggered the buggy behavior below
154 obj.join = Array.prototype.join;
157 actual = obj.join();
162 actual = obj.length;
167 obj.length = 2;
168 actual = obj.join();
175 * if Array.prototype.sort() had been applied to |obj|,
179 obj.length = 4;
180 actual = obj.join();