Created
August 2, 2016 17:42
-
-
Save sukhmeet2390/9b8d54bf50875e1d9b8c3692eebec0fc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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