images to svg

This commit is contained in:
Ilya Kantor 2019-07-28 15:42:37 +03:00
parent a31e881856
commit 3ba28aa104
734 changed files with 11682 additions and 245 deletions

View file

@ -24,7 +24,7 @@ class Animal {
let animal = new Animal("My animal");
```
![](rabbit-animal-independent-animal.png)
![](rabbit-animal-independent-animal.svg)
...And `Rabbit`:
@ -42,7 +42,7 @@ class Rabbit {
let rabbit = new Rabbit("My rabbit");
```
![](rabbit-animal-independent-rabbit.png)
![](rabbit-animal-independent-rabbit.svg)
Right now they are fully independent.
@ -88,7 +88,7 @@ Now the `Rabbit` code became a bit shorter, as it uses `Animal` constructor by d
Internally, `extends` keyword adds `[[Prototype]]` reference from `Rabbit.prototype` to `Animal.prototype`:
![](animal-rabbit-extends.png)
![](animal-rabbit-extends.svg)
So, if a method is not found in `Rabbit.prototype`, JavaScript takes it from `Animal.prototype`.
@ -384,7 +384,7 @@ So, in both lines `(*)` and `(**)` the value of `this.__proto__` is exactly the
Here's the picture of what happens:
![](this-super-loop.png)
![](this-super-loop.svg)
1. Inside `longEar.eat()`, the line `(**)` calls `rabbit.eat` providing it with `this=longEar`.
```js
@ -501,7 +501,7 @@ The reason is simple:
- So its `[[HomeObject]]` is `rabbit`, as it was created in `rabbit`. There's no way to change `[[HomeObject]]`.
- The code of `tree.sayHi()` has `super.sayHi()` inside. It goes up from `rabbit` and takes the method from `animal`.
![](super-homeobject-wrong.png)
![](super-homeobject-wrong.svg)
### Methods, not function properties