Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 440 Bytes

File metadata and controls

17 lines (11 loc) · 440 Bytes

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