Solución
solution.tsTypeScript
function startsWith(text: string, prefix: string): boolean {
// Escribe tu solución aquí
if (text.match(prefix) ){
console.log(`true texto: ${text} - prefijo ${prefix}`)
return true;
}
console.log(`false texto: ${text} - prefijo ${prefix}`)
return false;
}
// No modificar: necesario para evaluar el resultado.
export { startsWith };
startsWith("Mundo hola", "hola");0respuestas