Last active
October 23, 2017 17:15
-
-
Save clintonhalpin/611153786d27c5b7d546bb47f5c4c8a3 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
/** | |
* Code Golfing arrow functions | |
*/ | |
// map with parens and brackets | |
arr.map((item) => { return item }) | |
// Remove parens for args | |
arr.map(item => { return item }) | |
// Replace {} with () for even shorter, no need for return statement | |
arr.map(item => ( item )) | |
// Even Less Strokes | |
arr.map(item => item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment