Created
September 8, 2017 13:52
-
-
Save andilabs/64136beaf4b7fd0a7a7b5d0a1a89dde6 to your computer and use it in GitHub Desktop.
This file contains 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
// Parenthesize the body of function to return an object literal expression: | |
params => ({foo: bar}) | |
// Rest parameters and default parameters are supported | |
(param1, param2, ...rest) => { statements } | |
(param1 = defaultValue1, param2, …, paramN = defaultValueN) => { statements } | |
// Destructuring within the parameter list is also supported | |
let f = ([a, b] = [1, 2], {x: c} = {x: a + b}) => a + b + c; | |
f(); | |
// 6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment