Solución
JL@juanluisabreu_4c541ef6
·16/4/2026TypeScriptsolution.tsTypeScript
function uniqueWords(text: string): string[] {
if (text == "") return [];
let datos = text.split(" ").map(p => p.toLowerCase());
let resultado = []
datos.forEach(p => {
if (datos.filter(value => value == p).length == 1) resultado.push(p);
});
return resultado;
}
// Do not modify: needed to evaluate the result.
export { uniqueWords };
0respuestas