Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Object.prototype.x = "Honey Thakuria"
- var a = "Name"
- console.log(a.x) // "Honey Thakuria"
- // As we defined x at the top of prototype chain,hence it will be inherited to every child element
Add Comment
Please, Sign In to add comment