| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/TypeError | [Back] [Original] |
Get to know MDN better
TypeError() TypeError
TypeError.prototype TypeError
TypeError.prototype.constructorTypeError TypeError
TypeError.prototype.nameTypeError.prototype.name "TypeError"
try {
null.f();
} catch (e) {
console.log(e instanceof TypeError); // true
console.log(e.message); // "null has no properties"
console.log(e.name); // "TypeError"
console.log(e.stack); //
}
try {
throw new TypeError("Hello");
} catch (e) {
console.log(e instanceof TypeError); // true
console.log(e.message); // "Hello"
console.log(e.name); // "TypeError"
console.log(e.stack); //
}
| ECMAScript 2027 LanguageSpecification # sec-native-error-types-used-in-this-standard-typeerror |
| Web Proxy Viewer | New URL | Original Page |