Created
February 22, 2020 03:58
-
-
Save suissa/9327b0eadee2e50e7bfebb6e900499cc to your computer and use it in GitHub Desktop.
Demonstração de como criar operações básicas de matemática usando Arrays - divisão - refatorando
This file contains hidden or 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
const tamanhoDa = (lista) => lista.length | |
const dividir = (x, y, total = 0) => | |
tamanhoDa( | |
crieUmaListaDeTamanho(x) | |
.ePreenchaCom(y) | |
.filter( n => (total += n) <= x ) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment