How can we dynamically/programmatically extend a javascript class? More concretely, given something like class Polygon { constructor(area, sides) { thi
This figure again shows that every object has a prototype. Constructor function Foo also has its own __proto__ which is Function.prototype, and which in turn a