SyntaxFix
Write A Post
Hire A Developer
Questions
Any object in JavaScript is created based on a constructor function. And each function, including a constructor one, owns a name, which we can easily read:
class Person { type = "developer"; } let p = new Person(); p.constructor.name // Person