How to Check if a String Is Empty in JavaScript
A value your program needs, such as a setting or a form field, can be missing in more than one way: an empty string '', undefined or null. In JavaScript one test catches all three, because all three are falsy.
