Contact: aviboots(AT)netvision.net.il
39,043 questions
50,760 answers
573 users
let arr = [3, 7, 4, 5, 9, 1, 2]; arr = [...arr].sort((a, b) => b - a); console.log(arr); /* run: [9, 7, 5, 4, 3, 2, 1] */