MCPcopy Create free account
hub / github.com/CleverProgrammers/JavaScript-Course-by-Clever-Programmer- / sumArray

Function sumArray

playground.js:256–264  ·  view source on GitHub ↗
(numbers)

Source from the content-addressed store, hash-verified

254// result = 10
255
256const sumArray = (numbers) => {
257 let result = 0;
258 // for loop
259 for (const number of numbers) {
260 console.log(number)
261 result += number
262 }
263 return { result }
264}
265
266// const nums = [1, 2, 3, 4, 5]
267// console.log(sumArray(nums))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected