sort() - Sorts the array elements in dictionary order or using a compare function passed to the method.
Code:
words = new Array("limit","lines","finish","complete","In","Out")
word = words.sort() The value of words becomes:
In,Out,complete,finish,limit,lines