JS array sort
numArray.sort((a, b) => a - b); // For ascending sort
numArray.sort((a, b) => b - a); // For descending sort
pole třídění
/*
Arrays Methods [Sort]
- sort(Function [Opt])
- reverse
*/
let myFriends = [10, "Sayed", "Mohamed", "90", 9000, 100, 20, "10", -20, -10];
console.log(myFriends);
console.log(myFriends.sort().reverse());