Array and sorting demo III

Example

Note: This sort will sort numerically if all of the data is numeric. If the data is not all numbers, then the sort will sort alphabetically. Buttons are provided for both an ascending and descending sort.



The JavaScript code