I have various ES6 classes, with inheritance. I need to be able to recognize the class, from which the object was instantiated.
I see that Javascript allows us to check, if an object is an instance of a certain calss, using the "instanceof" operator. The problem with this, is that it forces me to make multiple checks, for every possible relevant class.
Isn't there a way in JS to just get the class of the ojbect? For instance, in PHP there's a method for that:
string get_class ([ object $object ] )
Can i achieve something similar in JS?