1) check non-empty string, true, 42, Infinity, [], ...
if (strValue) {
}
2) check empty string, false, 0, null, undefined, ...
if (!strValue) {
}
3) Check empty string only
if (strValue === "") {
}
4) Check non-empty string
if (strValue !== "") {
}
1) check non-empty string, true, 42, Infinity, [], ...
if (strValue) {
}
2) check empty string, false, 0, null, undefined, ...
if (!strValue) {
}
3) Check empty string only
if (strValue === "") {
}
4) Check non-empty string
if (strValue !== "") {
}
Comments
Post a Comment