Page 1 of 1

to know if something is an objet or an string (javascript)

Posted: Sun Apr 15, 2007 10:05 pm
by visonardo
if i do if(u.length!=0)... i cant, because may be that u is not an objet but is a string and u.length will return me the characters ammount that it has.

how can i know that?

Posted: Mon Apr 16, 2007 7:43 am
by feyd
Type detection isn't all that hard...

http://blogs.wdevs.com/Sukumar/archive/ ... /3335.aspx