Is there a standard function to check for null, undefined, or blank variables in JavaScript?
You can just check if the variable has a truthy value or not. That means if( value ) { } will evaluate to true if value is not: null undefined NaN empty string (“”) 0 false The above list represents all possible falsy values in ECMA-/Javascript. Find it in the specification at the ToBoolean section. … Read more