Skip to content

Instantly share code, notes, and snippets.

@aaronfrost
Created March 23, 2013 07:55
Show Gist options
  • Save aaronfrost/5226912 to your computer and use it in GitHub Desktop.
Save aaronfrost/5226912 to your computer and use it in GitHub Desktop.
Arrow Function - 11 - No parenthesis
//NONE
let add = () => 0 + 0; //0 params, parens required
//ONE PARAM
let add = x => x + x; //1 param, parens options
let add = (x) => x + x;
//MULTI PARAMS
let add = (x, y) => x + y; //multi params, parens required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment