Splits the receiver at separator
, returns an Array of at most limit
segments.
ES5 (15.5.4.14.5): If limit is undefined, let lim = 232-1; else let lim = ToUint32(limit).
ES6 (21.1.3.17.8): If limit is undefined, let lim = 253-1; else let lim = ToLength(limit).
- Return value is an Array, so a
limit
greater than 232-1 would result in a "malformed" array (one with elements past the end of the array). Iteration over the return value will skip all such elements.