Solución
solution.tsTypeScript
export function endsWithSuffix(str: string, suffix: string): boolean {
if(suffix.length === 0) return true
return str.slice(-suffix.length) === suffix
}0respuestas
export function endsWithSuffix(str: string, suffix: string): boolean {
if(suffix.length === 0) 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.