Programmer's Wiki
Advertisement
function sort(arr) {
	arr.sort();
}

Example Javascript Usage[]

arr = new Array('dog', 'cat', 'lion', 'tiger', 'bear');
sort(arr);
document.write(arr); /* Gives:  bear,cat,dog,lion,tiger  */
Advertisement