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
I use:
function empty(e) { switch (e) { case "": case 0: case "0": case null: case false: case typeof(e) == "undefined": return true; default: return false; } } empty(null) // true empty(0) // true empty(7) // false empty("") // true empty((function() { return "" })) // false