“`” 参考回答:

获取一个对象的原型,在chrome中可以通过<em>proto</em>的形式,或者在ES6中可以通过Object.getPrototypeOf的形式。

那么Function.proto是什么么?也就是说Function由什么对象继承而来,我们来做如下判别。

Function.<strong>proto</strong>==Object.prototype //false

Function.<strong>proto</strong>==Function.prototype//true

我们发现Function的原型也是Function。

我们用图可以来明确这个关系:

<a class=""url"" href='http://img width=""646"" alt=""2018-07-10 2 38 27"" src=""https://user-images.githubusercontent.com/17233651/42493275-f55d0860-844e-11e8-983f-e04189a4f3d8.png""' target=""_blank"">img width=""646"" alt=""2018-07-10 2 38 27"" src=""https://user-images.githubusercontent.com/17233651/42493275-f55d0860-844e-11e8-983f-e04189a4f3d8.png""</a>

<pre><code> "“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.