I often hear that a class A, defined with class A {...}, is just a constructor, but that doesn't seem to be the case since we can access the constructor as A.constructor. So is it the prototype? That doesn't seem to be the case either as A is different from A.constructor.prototype. And yet, A is a function: A instanceof Function evaluates to true and typeof A to 'function'.
So what is a class exactly? A thin wrapper around the constructor? Can we create a class programmatically so that it's impossible to distinguish it from a class created through the class keyword?