Last active
April 15, 2019 15:41
-
-
Save juniorgarcia/b843225ca545553f360250f57a7196be to your computer and use it in GitHub Desktop.
Artigo - Introdução a programação funcional com JavaScript - Exemplo 1
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
let numbers = [1, 5, 10]; | |
const doubleValue = x => x * 2; | |
console.log(numbers.map(doubleValue)); // [2, 10, 20] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment