Sortuj tablicę według postaci długości w JS

arr.sort((a, b) => a.length - b.length)
Delightful Dove