open_in_new
content_copy
// Ascending order array.sort((a,b) => a-b) // Descending order array.sort((a,b) => b-a)