Raquel Vieira
Raquel Vieira

Reputation: 13

Get name of an object type in Javascript

I use class.getName() code in JAVA language to get the name of a object type. But how can I do that in javascript language? I can't find anything similar.

Upvotes: 1

Views: 60

Answers (1)

Vinks
Vinks

Reputation: 156

You can use typeof or instanceof.

For more info, you can check this more detailed answer : How to get a JavaScript object's class?

Upvotes: 1

Related Questions