For Sorting of an Array of Numbers :: tempArray.sort(function(a,b) {return a-b; } ));For Sorting of an Array of Characters :: tempArray.sort();
array.sort()
Array of number by comparing numbers & characters by there Unicode