Just use the indexer to get the 9th element,
var el = arr[8];
Arrays are 0-based, so 8 would return the element at 9th index. For sorting, you can call the
.sort()
function of the object; for more please refer
MDN[
^]. You should also read the quotation about the description of the procedure:
Quote:
Elements are sorted by converting them to strings and comparing strings in Unicode code point order. For example, "Cherry" comes before "banana". In a numeric sort, 9 comes before 80, but because numbers are converted to strings, "80" comes before "9" in Unicode order.
Hopefully, you will get the idea for how to doing this from MDN.