How to sort array in descending order in JavaScript

Arrays
By Jad Joubran · 
Last updated Dec 23, 2017
const numbers = [10, 20, 30, 100, 5, 1, 20];

numbers.sort((a, b) => b - a);

console.log(numbers);
[100, 30, 20, 20, 10, 5, 1]
Array.sort on MDN