If you need to check specifically for an empty string over null, I would think checking against "" is your best bet, using the === operator (so that you ... ... <看更多>
But as a judgement call, I think we could stand to have a relatively simple check for values that are null or empty, so I'm looking for feedback on this ... ... <看更多>
To check if a value is null , you use the strict equality operator ... Besides false , 0 , an empty string ( '' ), undefined , NaN , null is a falsy value. ... <看更多>