Hello, so on the Java Data Structures and Algorithims stage, on the 14th part of the ES6 course where you are supposed to “Use Destructuring Assignment to Pass an Object as a Function’s Parameters”. I was very confused on why these two lines produce different results.
When you use curly braces on the right side of an arrow function then you must explicitly return a value with a return statement. Since you are not then the function returns undefined.
So an inline function with the arrow notation that has parenthesis only doesn’t require a return statement, but a destructured assignment inline function requires a return statement?