Skip to content

Instantly share code, notes, and snippets.

Last active March 2, 2018 10:23
What would you like to do?
Arrow functions example
// ES5
var multiply = function(a, b) {
return a * b;
// ES6
var multiply = (a, b) => { return a * b };
// even neater
var multiply = (a, b) => a * b;
Copy link

Single params need no brackets
var func = x => x * x;
concise body syntax, implied "return"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment