Firefox Tomorrow

javascript instance data property

Error: columnNumber

View on MDN ↗

The columnNumber data property of an Error instance contains the column number in the line of the file that raised this error.

Value

A positive integer.

0

Examples

Using columnNumber

try {
  throw new Error("Could not parse input");
} catch (err) {
  console.log(err.columnNumber); // 9
}

Specifications

Not part of any standard.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also