Skip to content
JS
JavaScript error

RangeError

The JavaScript exception "Invalid array length" occurs when specifying an array length that is either negative, a floating number or exceeds the maximum supported by the platform (i.e., when creating an Array or ArrayBuffer, or when setting the length property).

Reference entryJavaScriptFetched
RangeError: invalid array length (V8-based & Firefox)
As listed by MDN Web Docs
RangeError: Array size is not a small enough positive integer. (Safari)
As listed by MDN Web Docs
RangeError: Invalid array buffer length (V8-based)
As listed by MDN Web Docs
RangeError: length too large (Safari)
As listed by MDN Web Docs
Category
RangeError
Severity
error
Runtime
both
or press Cmd/Ctrl + Enter. The text is only sent to this site to match it.
Source: MDN Web Docs. Data fetched 2026-09-25T01:48:37.274Z.