We can just simply use array.sort() (the array contains alphabets), but that will sort the whole array. But I just want to sort a part of the array like this:
Lets assume array = ["c" , "d" , "b" , "f" , "a" , "e"]. Now, instead of sorting it completely, I want to sort it from index 2 to 5 , so array becomes ["c" , "d" , "a" , "b" , "e" , "f"].
Is there any method in Array.prototype to do this?
NOTE: I can write a custom function to solve this problem, but I am avoiding it. Maybe I could just get a quick solution...