cf.completefrontend

Predict the outputHard

What does this log when a static method updates this.count through a subclass?

What does this log?
class Model {
  static count = 0;
 
  static create() {
    this.count++;
    return new this();
  }
}
 
class User extends Model {}
 
Model.create();
User.create();
User.create();
 
console.log(Model.count, User.count);
console.log(Object.hasOwn(User, "count"));
console.log(User.create() instanceof Model);

The answer

Work out every line it logs, in order. Then check.

Checking your sign-in…