Answers for "check if type is string js"

13

javascript is variable a string

if (typeof myVar === 'string'){
    //I am indeed a string
}
Posted by: Guest on July-23-2019
0

check type string javascript

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

js check if variable is string

if (typeof myVar === 'string' || myVar instanceof String)
// it's a string
else
// it's something else
Posted by: Guest on January-01-1970

Code answers related to "check if type is string js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language