<p>コンソールをご確認ください</p>
class MyClass {
  #myBrand;

  static isMyClass(object) {
    return #myBrand in object;
  }
}

const myInstance = new MyClass();

console.log("↓MyClass.isMyClass(myInstance)");
console.log(MyClass.isMyClass(myInstance));

const foo = {
  name: "名探偵コナン"
};

console.log("↓MyClass.isMyClass(foo)");
console.log(MyClass.isMyClass(foo));

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.