Sorting an Array The sort() method sorts the items of an array in a specific order (ascending or descending). var city = ["California", "Barcelona", "Paris", "Kathmandu"]; var sortedArray = city.sort(); console.log(sortedArray);