Skip to content

Instantly share code, notes, and snippets.

@keokilee
Created March 27, 2015 22:08
Show Gist options
  • Save keokilee/632600222471ab7e81bd to your computer and use it in GitHub Desktop.
Save keokilee/632600222471ab7e81bd to your computer and use it in GitHub Desktop.
ES6 Arrow Functions
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