(numbers)
| 268 | // sum up all numbers in array |
| 269 | |
| 270 | const max = (numbers) => { |
| 271 | let result = numbers[0] |
| 272 | |
| 273 | // loop |
| 274 | for (const number of numbers) { |
| 275 | if (number > result) { |
| 276 | result = number |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | return { result } |
| 281 | } |
| 282 | |
| 283 | // console.log(max([1, 2, 3, 4, 5])) |
| 284 |
nothing calls this directly
no outgoing calls
no test coverage detected