So, I've never done this before, trying to add a method to the Array.prototype. See console.log statement below for usage. It keeps telling
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