let myStr = null;
if (myStr === null || myStr.trim() === "") {
console.log("This is an empty string!");
} else {
console.log("This is not an empty string!");
}
/*
This will return:
"This is an empty string!"
*/
if (typeof value !== 'undefined' && value) {
//deal with value'
};
let myStr = null;
if (myStr === null || myStr.trim() === "") {
console.log("This is an empty string!");
} else {
console.log("This is not an empty string!");
}