问题
Use destructuring assignment within the argument to the function half to send only max and min inside the function.
源
const stats = {
max: 56.78,
standard_deviation: 4.34,
median: 34.54,
mode: 23.87,
min: -0.75,
average: 35.85
};
// Only change code below this line
const half = (stats) => (stats.max + stats.min) / 2.0;
// Only change code above this line
解决
const half = ({max,min}) => {
return (max + min) / 2.0;
}