Created
January 4, 2017 00:14
-
-
Save ericelliott/926db53472105178c964d6aee324f629 to your computer and use it in GitHub Desktop.
Double mapping
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
const double = n => n * 2; | |
const doubleMap = numbers => numbers.map(double); | |
console.log(doubleMap([2, 3, 4])); // [ 4, 6, 8 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment