Get name of object or class

Get your object’s constructor function and then inspect its name property.

myObj.constructor.name

Returns “myClass”.

Leave a Comment