Answers for "display true if the parameter is type string"

0

display true if the parameter is type string

if (typeof myVar === 'string' || myVar instanceof String)
// it's a string
else
// it's something else
Posted by: Guest on October-15-2020

Code answers related to "display true if the parameter is type string"

Code answers related to "Javascript"

Browse Popular Code Answers by Language