| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Errors/Not_a_constructor | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
TypeError: Object doesn't support this action (Edge) TypeError: "x" is not a constructor TypeError: Math is not a constructor TypeError: JSON is not a constructor TypeError: Symbol is not a constructor TypeError: Reflect is not a constructor TypeError: Intl is not a constructor TypeError: SIMD is not a constructor TypeError: Atomics is not a constructor
TypeError
, - . constructor new operator, , .
, String Array, new. , - , .. . JavaScript - : Math, JSON, Symbol, Reflect, Intl, SIMD, Atomics.
- .
var Car = 1;
new Car();
// TypeError: Car is not a constructor
new Math();
// TypeError: Math is not a constructor
new Symbol();
// TypeError: Symbol is not a constructor
function* f() {}
var obj = new f();
// TypeError: f is not a constructor
, . , car, , , . , :
function Car(make, model, year) {
this.make = make;
this.model = model;
this.year = year;
}
, mycar ( ) :
var mycar = new Car("", "", 1993);
, , new Promise(...) .
( Promise ) TypeError: this is not a constructor:
return new Promise.resolve(true);
- Promise.resolve() Promise.reject() :
// , , :
return new Promise((resolve, reject) => {
resolve(true);
});
// , :
return Promise.resolve(true);
return Promise.reject(false);
This page was last modified on 29 . 2026 . by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |