JavaScript. Standard objects prototypes

Главная » Tutorials » JavaScript » JavaScript. Standard objects prototypes

In last lessons we were creating our own objects and working with its prototypes, implementing inheritance. Today we will consider prototypes of standard javascript objects.

In fact, when we create scalar variable (number or string), we create it with standard object-function. For example:

Any objects (user’s or js objects) have their own __proto__ and __proto__ from Object. It means, all objects will be inherited from Object.
For creating empty object, you need to write next code:

Подписаться на рассылку

Будьте в курсе - получайте последние статьи на свой email

Ваша подписка успешно оформлена

Pin It on Pinterest

Share This