Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js check if variable is string

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

if (typeof myVar === 'boolean'){
    //I am indeed a boolean
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #check #variable #string
ADD COMMENT
Topic
Name
3+6 =