Skip to content
JS
JavaScript error

TypeError

The JavaScript exception "Iterator constructor can't be used directly" or "AsyncIterator constructor can't be used directly" occurs when you try to use the Iterator() or AsyncIterator constructors directly to create instances. These constructors are abstract classes and should only be inherited from.

Reference entryJavaScriptFetched
TypeError: Abstract class Iterator not directly constructable (V8-based)
As listed by MDN Web Docs
TypeError: Iterator constructor can't be used directly (Firefox)
As listed by MDN Web Docs
TypeError: Iterator cannot be constructed directly (Safari)
As listed by MDN Web Docs
TypeError: Abstract class AsyncIterator not directly constructable (V8-based)
As listed by MDN Web Docs
TypeError: AsyncIterator constructor can't be used directly (Firefox)
As listed by MDN Web Docs
TypeError: AsyncIterator cannot be constructed directly (Safari)
As listed by MDN Web Docs
Category
TypeError
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.273Z.