Task: Sorting an Array of Objects by Property Values in JavaScript
Task: Sorting an Array of Objects by Property Values in JavaScript: a task in Terminal-Lego-15k (Harbor dataset). You need to create a JavaScript function that sorts an array of home listing objects by the price property. The function should support both ascending and descending order.
The task
You need to create a JavaScript function that sorts an array of home listing objects by the `price` property. The function should support both ascending and descending order.
Part of PrimeIntellect/Terminal-Lego-15k.