Solution:
Well, it is mandatory to read and follow the documentation carefully before starting a programming language. So, please check the Documentation before go ahead further.
If you want to check whether the string is empty/null/undefined, use the following code:
let emptyStr = "";
if (!emptyStr) {
console.log("This String is empty");
}
let nullStr = null;
if (!nullStr) {
console.log("This String is null");
}