Merge pull request #2024 from lumosmind/patch-47
One line of code creates a lot of confusing
This commit is contained in:
commit
edc6126980
1 changed files with 3 additions and 1 deletions
|
@ -33,7 +33,9 @@ We can check it like this:
|
|||
let obj = {};
|
||||
|
||||
alert(obj.__proto__ === Object.prototype); // true
|
||||
// obj.toString === obj.__proto__.toString == Object.prototype.toString
|
||||
|
||||
alert(obj.toString === obj.__proto__.toString); //true
|
||||
alert(obj.toString === Object.prototype.toString); //true
|
||||
```
|
||||
|
||||
Please note that there is no more `[[Prototype]]` in the chain above `Object.prototype`:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue