get type of string javascript code example Example: get type of string javascript var str = "this is string"; typeof str; // returns string