1到100相加

let sum = 0, n = 100;
sum = (1 + 100) * n / 2;

点赞