累加器

var n = 0;
for (var i =1; i <= 10; i++){

    n += i;
}
console.log(n);


2023-06-28T13:08:06.png

累乘器

 var mul = 1;
    for (var i =10; i >= 1; i--){

        mul *= i;
    }
    console.log(mul);

2023-06-28T13:05:46.png