how to get the class name of an object in javascript code example Example: get name of class javascript myObj.constructor.name