Sorting Of Integer Array

Ascending Order

Array.sort(function(a, b){return a-b});


Descending Order

Array.sort(function(a, b){return b-a});