typeof [function]
typeof( var )
returns the type name of variable var
, as string
- this function is equivalent to sgs_TypeOf in the C API
typeof( 5 ); // returns "real" typeof( [] ); // returns "array"
var
, as stringtypeof( 5 ); // returns "real" typeof( [] ); // returns "array"