9 lines
134 B
Plaintext
9 lines
134 B
Plaintext
```javascript
|
|
function sum(arr) {
|
|
let s = 0;
|
|
for (let i = 0; i < arr.length; i++) {
|
|
s += arr[i];
|
|
}
|
|
return s;
|
|
}
|
|
``` |