Triangular NumbersJan 2022
featured image

Formula

n * (n+1) / 2

// 1 + 2 + 3 + 4 + 5
const ans = 5 * (5 + 1) / 2;