tempArr2.sort();
Output :: ["a", "b", "c", "d", "e", "g", "s"]
So in there 2 examples this can be easily visible for sorting of an Array of numbers we need a call back function for sorting but sorting of characters is very straight forward just by calling .sort() method with the array variable.