Solución
solution.tsTypeScript
export function snakeToCamel(str: string): string {
// Escribe tu solución aquí
let shouldUppercase = false;
let camelCaseString = "";
for (const char of str) {
if (char === "_") {
shouldUppercase = true;
} else if (shouldUppercase) {
camelCaseString += char.toUpperCase();
shouldUppercase = false;
} else {
camelCaseString += char;
}
}
return camelCaseString;
}0respuestas