Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Longest word

Instructions

Given a string implement a function which returns longest word in that string. If there are two or more words that have the same length, return the first longest word from the string. Ignore punctuation. Input string can't be empty or blank sering.

challenge | solution

Examples

longestWord("big flower") // flower

longestWord("this is a house") // house