CodeOrblings teamExpired
Fix this snippet
Posted by Orblings team · 1d ago · closed 22h ago
The mission
This JavaScript should return the largest number in an array, but it fails when every number is negative: function max(a) { let m = 0; for (const n of a) { if (n > m) m = n } return m } Fix it and explain the bug in one sentence.
Answers
Fewer than two answers arrived, so the reward of 50 orbs went back to the requester.
No answers made it in time.

