Skip to content

Instantly share code, notes, and snippets.

@adarsh-chakraborty
Last active October 27, 2023 06:06
Show Gist options
  • Save adarsh-chakraborty/606f4aa146c41b75e1184307e0c134e4 to your computer and use it in GitHub Desktop.
Save adarsh-chakraborty/606f4aa146c41b75e1184307e0c134e4 to your computer and use it in GitHub Desktop.
Prototype in javascript
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