Reputation: 13
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
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