In the code, I think, the following comments are misplaced -
// .........................................................Note: although a `delete
// this.init` would remove the `init` function from the instance, it
// would still exist in its super class' prototype. ........................
The goal is to 'shadow the init method on the prototype,' which, is what should be communicated. Not sure what is being deleted? The instance itself doesn't have a init method.
The new comments can look something like this ->
// Shadow the init method on the prototype, by creating a
// init property on the instance, such that, the init method
// cannot be executed again by the same instance.
Hi,
In the code, I think, the following comments are misplaced -
The goal is to 'shadow the init method on the prototype,' which, is what should be communicated. Not sure what is being deleted? The instance itself doesn't have a init method.
The new comments can look something like this ->
// Shadow the init method on the prototype, by creating a // init property on the instance, such that, the init method // cannot be executed again by the same instance.