Created
July 10, 2018 15:48
-
-
Save matheus-rossi/5fc0b2b9369cc2106359d85e77120fbb to your computer and use it in GitHub Desktop.
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
// Atualizando item no array (.map) | |
const numeros = [1, 2, 3] | |
function dobrar (num) { | |
return num * 2 | |
} | |
const dobrarEs6 = num => num *2 | |
const numerosVezesDois = numeros.map(dobrarEs6) | |
console.log(numerosVezesDois) // [ 2, 4, 6 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment