What is an Array

An array is an ordered collection of similar types of elements. It is used when we want to store a list of elements and access them in a single variable. In most languages, the arrays are a reference to multiple variables but in javascript, an array is a single variable that stores multiple elements. Javascript has many different types of methods in an array which helps us to access and process the data.

In this article, we can talk about the Array. sort() method, and let’s see how this function works with a different scenario.

Array.sort() method in Javascript

Sort is a term that…

Vivek Kumar Behera

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store