Define a word as a sequence of consecutive English letters. Find the longest word from the given string.
const myString = 'Find the longest word from the given string.' const myStringArr = myString.split(' ') function longestWord(myStringArr) { let longestWord = '' for (let word of myStringArr) { if (word.length > longestWord.length) { longestWord = word } } return longestWord }