DEV Community 👩‍💻👨‍💻

Cover image for JavaScript Sorting Multidimensional Array

Posted on • Originally published at

JavaScript Sorting Multidimensional Array

Sorting is a technique to arrange item to Increasing or Decreasing order

Sorting of item done by comparison of another item or element

Sort Single Dimensional Array

Single Dimensional Array have sorted by javascript sort method

Image description
Single dimension array sorting output

Image description

Sorting Multidimension Array

Multidimensional array sorted using array sort() method

Multidimensional array sorted on the basis of column index number

In below image we sort array on the basis of third column or element ( 2 index ) of inner array

Image description
Output of multidimension array sorting

Image description
Learn more artical related to Web Dev also visit

Oldest comments (0)

Visualizing Promises and Async/Await 🤯

async await

☝️ Check out this all-time classic DEV post