// 求1!+2!+3!+...+10!的和
var sum = 0;
var sum1 = 1;
for (let i = 1; i <= 10; i++) {
sum1 = sum1 * i;
sum = sum + sum1;
}
document.write(sum);
// 求1!+2!+3!+...+10!的和
var sum = 0;
var sum1 = 1;
for (let i = 1; i <= 10; i++) {
sum1 = sum1 * i;
sum = sum + sum1;
}
document.write(sum);