Created
November 25, 2019 14:27
-
-
Save sag1v/beb91b0f873b22d3033927b174015c4d to your computer and use it in GitHub Desktop.
Markdium-JavaScript - The prototype chain in depth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function double(num){ | |
return num * 2; | |
} | |
double.toString() // where is this method coming from? | |
Function.prototype // {toString: f, call: f, bind: f} | |
double.hasOwnProperty('name') // where is this method coming from? | |
Function.prototype.__proto__ // -> Object.prototype {hasOwnProperty: f} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment