paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 70a29368d3870682bbcb429471c6bb533f7a4664
parent bdbd94e29e20a63ffcd101b59f576bc715614a12
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Mon, 15 Apr 2019 02:14:34 -0400

Change sorted order to reverse

Diffstat:
Mpublic/js/initiative.js | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/public/js/initiative.js b/public/js/initiative.js @@ -62,14 +62,15 @@ function addChar() { function compare(a, b) { if (a.initiative < b.initiative) - return -1; - if (a.initiative > b.initiative) return 1; + if (a.initiative > b.initiative) + return -1; else return 0; } function sortList() { + // Sorts in order largest to smallest charArray.sort(compare); // Delete all divs of class initiative-div for (let i = 0; i < charArray.length; i++) {