Last active
June 14, 2020 21:52
-
-
Save libotti/b03809ed7418962a23cfe9e7ed3b8b55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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