@@ -6,16 +6,11 @@ function array_multisort (arr) {
6
6
// * example 2: jobs = {A: 'Warrior', B: 'Thief', C: 'Monk', D: 'Mage', E: 'Knight'};
7
7
// * example 2: array_multisort(characters, 'SORT_DESC', 'SORT_STRING', jobs, 'SORT_ASC', 'SORT_STRING');
8
8
// * returns 2: true
9
- // * results 2: characters == {D: 'Terra', C: 'Sabin', B: 'Locke', E: 'Edward', A: 'Edward'};
10
- // * results 2: jobs == {D: 'Mage', C: 'Monk', B: 'Thief', E: 'Knight', A: 'Warrior'};
11
9
// * example 3: lastnames = [ 'Carter','Adams','Monroe','Tyler','Madison','Kennedy','Adams'];
12
10
// * example 3: firstnames = ['James', 'John' ,'James', 'John', 'James', 'John', 'John'];
13
11
// * example 3: president = [ 39, 6, 5, 10, 4, 35, 2 ];
14
12
// * example 3: array_multisort(firstnames, 'SORT_DESC', 'SORT_STRING', lastnames, 'SORT_ASC', 'SORT_STRING', president, 'SORT_NUMERIC');
15
13
// * returns 3: true
16
- // * results 3: firstnames == ['John', 'John', 'John', 'John', 'James', 'James', 'James'];
17
- // * results 3: lastnames == ['Adams','Adams','Kennedy','Tyler','Carter','Madison','Monroe'];
18
- // * results 3: president == [2, 6, 35, 10, 39, 4, 5];
19
14
// Fix: this function must be fixed like asort(), etc., to return a (shallow) copy by default, since IE does not support!
20
15
// VARIABLE DESCRIPTIONS
21
16
//
0 commit comments