//Higher order function for sorting
numArray.sort((a, b) => a - b); // For ascending sort
numArray.sort((a, b) => b - a); // For descending sort
const points = [40, 100, 1, 5, 25, 10];
points.sort(function(a, b){
return a - b
});
////HOF/////
numArray.sort(function(a, b){
return a - b
});
//output >> [1 ,5 , 10 ,25 ,40 ,100]