DEV Community

Discussion on: JavaScript Katas: Sort and Star

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited
const sortAndStar = stringArray=>[...stringArray.sort()[0]].join('***')
Collapse
 
miku86 profile image
miku86

Hey Jon,

thanks for your solution!

So instead of using split, we convert the string into a new array by spreading it.