longestWords

This commit is contained in:
Maria Carolina Oliveira da Silva 2022-11-02 19:34:16 -03:00
parent a46216dfad
commit 4fee33a764

View File

@ -1,5 +1,5 @@
export function longestWords(words) { export function longestWords(words) {
let longest = ''; var longest = '';
for (const word of words) { for (const word of words) {
if (word.length > longest.length) { if (word.length > longest.length) {