DEV Community

loading...

Discussion on: Challenge: Get Closest Number in an Array

Collapse
lucifer1004 profile image
Gabriel Wu • Edited

Be careful that ... can cause a range error:

RangeError: Maximum call stack size exceeded

when the nums array is very large.