Created
March 27, 2015 22:08
-
-
Save keokilee/632600222471ab7e81bd to your computer and use it in GitHub Desktop.
ES6 Arrow Functions
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
var nums = [1, 2, 3]; | |
var doubleES5 = nums.map(function(num) {return num * 2;}); | |
var doubleES6 = nums.map((num) => num * 2); | |
doubleES5 === doubleES6; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment