Determines whether the provided value is an Error object.
Error
The value to be checked.
true if the value is an Error object, otherwise false.
true
false
This function checks whether a value is an instance of Error or matches the internal [[Class]] tag of [object Error].
[[Class]]
[object Error]
This ensures compatibility across realms (e.g., iframes).
new Error()
new TypeError()
{ message: 'err' }
'error'
null
1.0
Determines whether the provided value is an
Errorobject.