OMFG JavaScript!
May. 8th, 2020 02:08 pmExplain this:
Why, JavaScript, why. I hate you, JavaScript. Grrrr.
a = [3,5,3,2,1,6,7,9,4,0,7,6,5,4,3]
(15) [3, 5, 3, 2, 1, 6, 7, 9, 4, 0, 7, 6, 5, 4, 3]
a.sort( (a,b) => { a-b } );
(15) [3, 5, 3, 2, 1, 6, 7, 9, 4, 0, 7, 6, 5, 4, 3]
a.sort( (a,b) => { a-b; } );
(15) [3, 5, 3, 2, 1, 6, 7, 9, 4, 0, 7, 6, 5, 4, 3]
a.sort( (a,b) => a-b );
(15) [0, 1, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 9]
Why, JavaScript, why. I hate you, JavaScript. Grrrr.
no subject
Date: 2020-05-08 06:26 pm (UTC)