Skip to content

Instantly share code, notes, and snippets.

View call0fcode's full-sized avatar
:octocat:
Working from home

Juan Gómez Carrillo call0fcode

:octocat:
Working from home
View GitHub Profile
// Solución nivel fácil
export function sumNumbers(numbers: number[]):number {
return numbers.reduce((sum, num) => sum + num, 0);
};
// Solución nivel medio
export function sumNumbers(numbers: number[]):number {
return numbers
.filter(Number.isInteger)
.reduce((sum, num) => sum + num, 0);