The way to view the prototype chain can be viewed in full from the console

function Foo(){}
let foo = new Foo()
console.log(foo)
Copy the code

The prototype of the collation will be collated as follows

We know that every JS object has an implicit __proto__ prototype property, and the prototype property shown is Prototype. Only Object.prototype.proto is null if unmodified

Take a few examples from the picture above

  1. Object instanceof Object The result is true

The prototype property of Object is Object.prototype. Proto =Function. Prototype. Prototype’s __proto__ property points to Object.prototype

  1. Function instanceof Function
  2. Function instanceof Object
  3. Foo instanceof Object
  4. Foo instanceof Function
  5. Foo instanceof Foo

Follow the principles in the diagram to understand the above problems. The sixth is false. The rest are true