📅  最后修改于: 2022-03-11 15:03:29.928000             🧑  作者: Mango
const drinks1 = [
{name: 'lemonade', price: 90},
{name: 'lime', price: 432},
{name: 'peach', price: 23}
];
function sortDrinkByPrice(drinks) {
return drinks.sort((a, b) => a.price - b.price);
}