This document demonstrates sorting an array in JavaScript. It defines an array with 5 integer elements, prints the original unsorted array, uses the sort() method to sort the array, and then prints the sorted array.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
14 views
Sorting of An Array
This document demonstrates sorting an array in JavaScript. It defines an array with 5 integer elements, prints the original unsorted array, uses the sort() method to sort the array, and then prints the sorted array.