How to get subclasses in JavaScript?

for example, how do you get all the subclasses of a specified base class using a class defined by es6 class?

for example, three classes A, B, C

are defined below.
class A {}
class B extends A{}
class C extends A{}

how do we get all the subclasses of A? (= ^--^ =)

< hr >

some people say that this question is meaningless. Haven"t you ever experienced the situation of switching multiple operations according to the state? Is it more elegant to use if-else judgment one by one than to use class to implement polymorphism? Please tell me

May.05,2022

  https://blog.rxliuli.com/p/e1...

					
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e947-41467.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e947-41467.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?