Lines Matching refs:sort
30 // Test array sort.
36 // Default sort converts each element to string and orders
38 a.sort();
40 // Sort numbers by value using a compare functions.
41 a.sort(function(x, y) { return x - y; });
44 // Default sort on negative numbers.
46 a.sort();
49 // Default sort on negative and non-negative numbers.
51 a.sort();
55 a = [9, 1000000000].sort();
57 a = [1000000000, 1].sort();
59 a = [1000000000, 0].sort();
63 a = [1230, 123].sort();
65 a = [1231, 123].sort();
68 // Default sort on Smis and non-Smis.
70 a.sort();
131 a.sort();
145 a.sort();
156 a.sort();
167 a.sort();
178 a.sort(function(x, y) { return 1; });
179 a.sort();
193 Array.prototype.sort.call(obj);
213 Array.prototype.sort.call(x);
232 Array.prototype.sort.call(x);
257 Array.prototype.sort.call(x);
258 // Behavior of sort with accessors is undefined. This accessor is
283 Array.prototype.sort.call(obj, function(a,b) { return (b < a) - (a < b); });
315 Array.prototype.sort.call(y);
364 Array.prototype.sort.call(x);
393 // Test that sort calls compare function with global object as receiver,
406 arr.sort(cmpTest);