Solución
solution.tsTypeScript
function splitCamelCase(text: string): string[] {
let currentWord = text.charAt(0).toLowerCase();
const words : string[]=[];
for(let i = 1; i < text.length; i++){
if(text.charAt(i).toUpperCase() === text.charAt(i)){
words.push(currentWord);
currentWord = "";
}
currentWord = currentWord + text.charAt(i).toLowerCase();
}
words.push(currentWord);
console.log(words);
return words
}
// No modificar: necesario para evaluar el resultado.
export { splitCamelCase };0respuestas