1// Sort an array of numbers based on numerical value.
2let numbers = [23, 65, 88, 12, 45, 99, 2000]
3
4let sortednumbers = numbers.sort((a, b) => a - b);
5//=> [12, 23, 45, 65, 88, 99, 2000]
1const months = ['March', 'Jan', 'Feb', 'Dec'];
2months.sort();
3console.log(months);
4// expected output: Array ["Dec", "Feb", "Jan", "March"]