How to know in the browser?
Navigate to the console of the browser near you and type this simple function
Person shown below and hit enter. Next, type Person followed by dot (.) see the methods on Person function. Pretty simple.
We can call functions on function. Let’s invoke
call function and see the output.
Objects are keyed collection/associative array that has a hidden link to the prototype object. Try the following code in any browser console and understand it.
We can access the prototype object using Object.prototype.
We can get an original object back from the prototype object using constructor (Object.prototype.constructor) property.
Pictorial representation of Object and it’s prototype object.
Oh, wait! We were talking about Function.
Like Object, Function is linked to Function.prototype.
Let me show you using Person function, it’s prototype object and their linking in the browser console.