// passing parameters form property
const stats = {
max: 56.78,
standard_deviation: 3.34,
median: 34.55,
mode: 23.34,
min: -0.34,
average: 35.56
};
const half = (function() {
return function half({ max, min}) {
return (max + min) / 2.0;
};
})();
console.log(stats);
console.log(half(stats));
JS - passing parameters form property
最新推荐文章于 2022-11-25 22:40:15 发布