I saw this question, but I didn\'t see a JavaScript specific example. Is there a simple string.Empty available in JavaScript, or is it just a case of checking f
string.Empty
If one needs to detect not only empty but also blank strings, I'll add to Goral's answer:
function isEmpty(s){ return !s.length; } function isBlank(s){ return isEmpty(s.trim()); }