쇼핑몰을 만들려고 할 때 꼭 있어야 하는 가격 정렬, 상품명 정렬 등.. 이런 기능이 필요합니다. 1. 상품명으로 정렬하기 let goods = [ { name: 'Pink cote', cost: 34000 }, { name: 'Blue cote', cost: 54000 }, { name: 'Orange cote', cost: 72000 }, ]; // 상품명으로 오름차순 정렬 // 원본은 유지하기. let copyGoods = [...goods]; copyGoods.sort((item1, item2) => { return item1.title > item2.title ? 1 : -1; }); // 상품명으로 내림차순 정렬 copyGoods.sort((item1, item2) => { return ite..