Answers for "javascript to check if variable empty exists"

15

javascript check if variable exists

if (typeof myVar !== 'undefined') {
    // myVar is defined
}
Posted by: Guest on July-23-2019
5

php code to check if variable is null

if(empty($var1)){
    echo 'This line is printed, because the $var1 is empty.';
}
Posted by: Guest on May-01-2020

Code answers related to "javascript to check if variable empty exists"

Code answers related to "Javascript"

Browse Popular Code Answers by Language