10 lines
159 B
JavaScript
10 lines
159 B
JavaScript
export function sum(values) {
|
|
let total = 0;
|
|
for(let i = 0; i < values.length; i++){
|
|
total += values[i];
|
|
|
|
}
|
|
return total;
|
|
}
|
|
|