# Introduction In this lab, we will learn how to sort an array of objects alphabetically based on a given property using JavaScript. We will use the `Array.prototype.sort()` method and the `String.prototype.localeCompare()` method to compare the values for the given property. This will allow us to easily sort the array in ascending or descending order, based on our requirements.
Click the virtual machine below to start practicing