Last updated 4 years ago
var nlist = [1, 6, 8, 2, 16, 0] nlist.sort((a, b) => a.compareTo(b));
var nlist = [1, 6, 8, 2, 16, 0] nlist.sort((b, a) => a.compareTo(b));
sumber