const numbers = [45, 5, 1, 0, 22, 60, 90, 78]; //normal sort method does not work numbers.sort( (a, b) { return b - a; } ); numbers.sort( (a,b ) => b - a ); // if a is greater then we should return -1 // if b is greater then we should return 1 // if a equals b then we should return 0;