Standard built-ins

Error.stack

Try the free JavaScript compiler

Common diagnostic extension with engine-dependent representation; do not parse its format as a portable program contract.

Formal Syntax & Structure

javascript syntaxjavascript
error.stack

Return Value

Implementation-dependent

Diagnostic stack representation when available.

Working Example

Example Snippetjavascript
console.log(typeof new Error("x").stack);
JavaScript Reference