Skip to content

Instantly share code, notes, and snippets.

@sukhmeet2390
Created August 2, 2016 17:42
Show Gist options
  • Save sukhmeet2390/9b8d54bf50875e1d9b8c3692eebec0fc to your computer and use it in GitHub Desktop.
Save sukhmeet2390/9b8d54bf50875e1d9b8c3692eebec0fc to your computer and use it in GitHub Desktop.
const func1 = (x, y) // SyntaxError
=> {
return x + y;
};
const func2 = (x, y) => // OK
{
return x + y;
};
const func3 = (x, y) => { // OK
return x + y;
};
const func4 = (x, y) // SyntaxError
=> x + y;
const func5 = (x, y) => // OK
x + y;
// Line breaks inside parameter definitions are OK:
const func6 = ( // OK
x,
y
) => {
return x + y;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment