Solución
solution.tsTypeScript
export function endsWithSuffix(str: string, suffix: string): boolean {
// Escribe tu solución aquí
if( str === '' || suffix === '') return true;
return str.slice(-suffix.length) === suffix;
}0respuestas
export function endsWithSuffix(str: string, suffix: string): boolean {
// Escribe tu solución aquí
if( str === '' || suffix === '') return true;
return str.slice(-suffix.length) === suffix;
}Aún no hay respuestas
¡Sé el primero en responder!
Recuerda ser amable. Estás comentando la solución de otra persona. Comparte tu perspectiva de forma constructiva y respetuosa.