How to check an empty string in Javascript

Posted by Wei Xia on December 16, 2017

Question:

How to check an empty string in an if-else statement?

Answer:

if (strValue) {
    //do something
}

Your code will run only if strValue has value.

Reference


This is the end of post