Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save libotti/b03809ed7418962a23cfe9e7ed3b8b55 to your computer and use it in GitHub Desktop.
Save libotti/b03809ed7418962a23cfe9e7ed3b8b55 to your computer and use it in GitHub Desktop.
public obterQuantidadeDeCreditosSelecionados(lista: Disciplina[]): number {
return lista
.filter(x => x.selecionada)
.map(x => x.credito)
.reduce((sum, current) => sum + current, 0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment