ShareCopy to ClipboardRawPreviewconst sumN = (n: number) => (n * (n + 1)) / 2; Sum all numbers00gioyikCodiga's TypeScript RecipesSums all the numbers between 1 and n.0 CommentsAdd CommentLog in to add a comment