The sort method available on the Array prototype allows you to sort the elements of an array and controll how the sorting should be done. The aim of this post is to explain to you why, why not and how the sort method works when sorting an array of numbers….