Answers for "js if null or empty then 0"

20

javascript null or empty

var myVar=null;

if(myVar === null){
    //I am null;
}

if (typeof myVar === 'undefined'){
    //myVar is undefined
}
Posted by: Guest on August-01-2019
0

js if empty then 0

a = a || 0
Posted by: Guest on October-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language