<script>
// 3、写一个函数,返回参数的平方和?
function sum() {
let a = 0;
for (let i = 0; i < arguments.length; i++) {
a += arguments[i] * arguments[i];
}
return a;
}
var result = sum(11,22,33);
console.log(result);
</script>
<script>
// 3、写一个函数,返回参数的平方和?
function sum() {
let a = 0;
for (let i = 0; i < arguments.length; i++) {
a += arguments[i] * arguments[i];
}
return a;
}
var result = sum(11,22,33);
console.log(result);
</script>