Skip to content

Commit 68b003f

Browse files
committed
Add a simple example for sum
1 parent cc71e41 commit 68b003f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

snippets/sum.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ const sum = (...arr) => [...arr].reduce((acc, val) => acc + val, 0);
99
```
1010

1111
```js
12+
sum(1, 2, 3, 4); // 10
1213
sum(...[1, 2, 3, 4]); // 10
1314
```

0 commit comments

Comments
 (0)