I am new to javascript. Today I learned about prototypes. I want to know why dunder prototypes are discouraged and why we use Object.getPrototypeOf in its place? I only noticed the difference in the way we write them.
Dunder prototype - objectname.prototype.function
new way that I learned - Object.getPrototypeOf(objectname)