js简单实现累加

var x = 0, n = 0;
while (x<10) {
    x++;
    n += x;
}
console.log(n);//55

 

posted @ 2019-09-18 14:49  超哥20  阅读(4474)  评论(0编辑  收藏  举报