refactor classes, add private, minor fixes

This commit is contained in:
Ilya Kantor 2019-03-05 18:44:28 +03:00
parent a0c07342ad
commit 1373f6158c
270 changed files with 1513 additions and 890 deletions

View file

@ -0,0 +1,20 @@
importance: 5
---
# Strange instanceof
Why `instanceof` below returns `true`? We can easily see that `a` is not created by `B()`.
```js run
function A() {}
function B() {}
A.prototype = B.prototype = {};
let a = new A();
*!*
alert( a instanceof B ); // true
*/!*
```