const prices = [400.50, 3000, 99.99, 35.99, 12.00, 9500]; // Sorting books by their rating: // use slice to copy the array const acscendingsOrders = prices.slice().sort((a, b) => a.toFixed(2) - b.toFixed(2)) const descendingOrders = prices.slice().sort((a, b) => b.toFixed(2) - a.toFixed(2))