Find Class of a variable in Javascript

Posted . Visible to the public.

As we have object.class method in Ruby, to check the class of a variable in Javascript, here is the snippet

var ss = "some string";
alert (typeof ss);  #=> string
alert (typeof pp);  #=> undefined
Sandheep
Posted by Sandheep to Sandheep's deck (2013-06-28 10:05)