How do i get the own classname of a class in javascript?
I implemented a method and i want to catch an error by logging the error with a message in which class the error happened.
My current solution is dirty: I save the class-name in the constructor
constructor{
this.className = 'MyClass';}
However, i think there must be a better solution, something like Object.protytpe.XXX
I googled and searched in Stackoverflow, but all the answers didnt result in my desired output.
May somebody have an idea?