Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
function sort([...arr]) { const max = arr.reduce((max, n) => max?.population > n.population ? max : n, null); return arr.sort((a, b) => a === max ? -1 : b === max ? 1 : a.city.localeCompare(b.city)); }