Guest User

Untitled

a guest
May 26th, 2021
52
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let input = ['2, 3, 1, 5, 6'];
  2. let print = this.print || console.log;
  3. let gets = this.gets || ((arr, index) => () => arr[index++])(input, 0);
  4.  
  5. const numbersArray = gets().split(', ').map(Number);
  6. numbersArray.sort((a, b) => b - a);
  7.  
  8. print(numbersArray.join(','));
RAW Paste Data