I have been diving into JavaScript recently, and after spending several months on it I am still confused about some of the internals.
Specifically, I was trying to wrap my head around the so-called Standard Built-In Objects.
What I Know
- All functions in JavaScript, both built-in and user-created, are objects (
function objects) - Difference between
general objectsandfunction objectsis thatfunction objectsimplement the[[Call]]property (and can thus be invoked) - All
function objectsimplement the.prototypeproperty, which represents the prototype of all objects created with thefunction objectas a constructor
Questions
- Are all the
Standard Built-In Objectsactuallyfunction objects(i.e. constructor functions)? - Do all (and only)
function objectsimplement.prototype? - Are the right terms
general objectvsfunction object?
Thank you.