From 0e0f4e35a2d151b17df1acf7422fbfa70836d9b4 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Sun, 1 Nov 2020 09:24:12 +0300 Subject: [PATCH] Update article.md --- 1-js/08-prototypes/01-prototype-inheritance/article.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/1-js/08-prototypes/01-prototype-inheritance/article.md b/1-js/08-prototypes/01-prototype-inheritance/article.md index 53af8391..9d60fa12 100644 --- a/1-js/08-prototypes/01-prototype-inheritance/article.md +++ b/1-js/08-prototypes/01-prototype-inheritance/article.md @@ -12,7 +12,7 @@ In JavaScript, objects have a special hidden property `[[Prototype]]` (as named ![prototype](object-prototype-empty.svg) -The prototype is a little bit "magical". When we want to read a property from `object`, and it's missing, JavaScript automatically takes it from the prototype. In programming, such thing is called "prototypal inheritance". Many cool language features and programming techniques are based on it. +When we read a property from `object`, and it's missing, JavaScript automatically takes it from the prototype. In programming, such thing is called "prototypal inheritance". And soon we'll see the examples. The property `[[Prototype]]` is internal and hidden, but there are many ways to set it. @@ -31,6 +31,8 @@ rabbit.__proto__ = animal; */!* ``` +Here, the `rabbit` object has `animal` as its prototype. + ```smart header="`__proto__` is a historical getter/setter for `[[Prototype]]`" Please note that `__proto__` is *not the same* as `[[Prototype]]`. It's a getter/setter for it.