Q:

display true if the parameter is type string

if (typeof myVar === 'string' || myVar instanceof String)
// it's a string
else
// it's something else
0

New to Communities?

Join the community