when I am trying to deconstruct this object, the object only deconstructs when I omit the braces, but I don’t understand why.
object:
const stats = {
max: 56.78,
standard_deviation: 4.34,
median: 34.54,
mode: 23.87,
min: -0.75,
average: 35.85
};
object deconstruction that does not work:
const half = ({max, min}) => {(max+min)/2.0};
object deconstruction that does work:
`const half = ({max, min}) => (max+min)/2.0;`