[Solved] How can I identify kind of variable I’m trying to compare in JavaScript?

[ad_1]

User Himal say use typeof.. so I can found the answer

var myvar=5
alert(typeof myvar);
 //alerts "number"

so to know kind of varible use typeof

source : http://www.javascriptkit.com/javatutors/determinevar2.shtml

[ad_2]

solved How can I identify kind of variable I’m trying to compare in JavaScript?