Last active
October 27, 2023 06:06
-
-
Save adarsh-chakraborty/606f4aa146c41b75e1184307e0c134e4 to your computer and use it in GitHub Desktop.
Prototype in javascript
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
arr.__proto__ = object | |
arr.prototype is same is arr.__proto__ which is a object. | |
and each and every object in javascript has a prototype. | |
that means arr.__proto__ also has a prototype | |
arr.__proto__.__proto__ which is actually Object.prototype which is again an object | |
arr.__proto__.__proto__.__proto__ | |
then it returns null in the end | |
Object.__proto__.__proto__ is null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment