how to check datatype of a string value code example Example: check data type in js var x = "Hello World"; typeof x; // "string"