Prototype knowledge of functions

All functions have a prototype and all objects have a __proto__ prototype.

If you care, you’ll notice that functions also have a __proto__ attribute.

We say that a constructor is a class, and its instance is called an instance object, and the Function we’re creating is an instance of this built-in JS class, Function, so you get the idea, functions are ordinary objects. Function __proto__ refers to the prototype object of the Function class.

  • Properties for built-in classes can be viewed using the dir() method

Look at the picture