Answers for "how to check if it is string in javascript"

16

if string javascript

if (typeof myVar === 'string') { /* code */ };
Posted by: Guest on July-23-2020
6

js check if variable is string

if (typeof myVar === 'integer'){
    //I am indeed an integer
}

if (typeof myVar === 'boolean'){
    //I am indeed a boolean
}
Posted by: Guest on March-19-2020
0

if is a string javascript

if (typeof myVar === 'integer'){
    //I am indeed an integer
}

if (typeof myVar === 'boolean'){
    //I am indeed a boolean
}
Posted by: Guest on April-06-2021

Code answers related to "how to check if it is string in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language