---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# Error.prototype.name

The **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `"Error"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.

## Value

A string. For `Error.prototype.name`, the initial value is `"Error"`.

## Description

By default, [`Error`](../Error.mdx) instances are given the name "Error". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.
