challenge-algorithms-v2.0-e.../10-longestWords/index.js

10 lines
213 B
JavaScript
Raw Normal View History

export function longestWords(words) {
// implementar logica aqui
2022-11-02 13:27:30 +00:00
let maior = "";
for (const string of words) {
if (string.length > maior.length) {
maior = string;
}
}
}