Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
automatic semicolon insertion (ASI)
The syntax forbids line terminators between the throw keyword and the expression to be thrown.
The syntax forbids line terminators between the throw keyword and the expression to be thrown.
This example defines a function that throws a TypeError if the input is not of the expected type.
This example calls a callback-based async function, and throws an error if the callback receives an error.
This page was last modified on Jul 8, 2025 by MDN contributors.