array.sort()
Interviews3 answers
How do you sort an Array of Numbers and an Array of Characters?
3 Answers
Bidyasagar MishraPosted Aug 1, 2019, 9:45 PM EDT
Array of number by comparing numbers
& characters by there Unicode
Mukesh KumarPosted Sep 2, 2017, 6:47 PM EDT
For Sorting of an Array of Numbers ::
tempArray.sort(function(a,b)
{
return a-b;
}
));
For Sorting of an Array of Characters ::
tempArray.sort();
Anurag TomarPosted Apr 18, 2016, 3:24 AM EDT


