3 ms·
His diff was lame, I'm sure the coworker would have gone along with Math.max(...list);
by yesbabyyes 7y ago
His diff was lame, I'm sure the coworker would have gone along with
Math.max(...list);
- tlb 7y agoThat hack isn't guaranteed to work with long lists, since the standard allows a fixed limit on argument count. For example, in Node 12: > Math.max(..._.range(0, 1000000)) Thrown: RangeError: Maximum call stack size exceeded