UNB/ CS/ David Bremner/ teaching/ cs2613/ books/ mdn/ Reference/ Global Objects/ Error/ ""Error:

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.

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

See also