forked from M3-Academy/challenge-algorithms-v2.0
8 lines
178 B
JavaScript
8 lines
178 B
JavaScript
export function longestWords(words) {
|
|
var longest = "";
|
|
for (var word of words) {
|
|
if (words.length > longest.length) longest = words;
|
|
}
|
|
return longest;
|
|
}
|