JSFiddle - React, Tailwind, and code Playground
by LuckyCat
JavaScript
function findLongestWord(str) {
let stringArray = str.split(" ");
let orderedArray = stringArray.sort((a, b) => {
return a.length > b.length;
});
console.log("Длина самого короткого слова: " + orderedArray[0].length);
return orderedArray[0].length;
}
findLongestWord("bitcoin take over the world maybe who knows perhaps");