finding class name of an object in js
Date: 05/11/07
(Web Development) Keywords: no keywords
Is there a way to find the class name of variable?
typeof(obj); //<-- only says 'object'
obj instanceof MyClass // <- returns boolean
But I want the equivalent of ruby's class() method.
obj.class() # <- outputs 'MyClass'
Source: http://community.livejournal.com/webdev/407275.html
|