Pointless If statement
We’ve all seen this:
if (kRegex.test(value)) {
return true;
} else {
return false;
}
Eew.
Beautified:
return kRegex.test(value);
A place for ugly, silly, or just-plain-crap JavaScript.
We’ve all seen this:
if (kRegex.test(value)) {
return true;
} else {
return false;
}
Eew.
Beautified:
return kRegex.test(value);
Subscribe or follow @UglyJS!
.........
Fork then send a pull request to contribute.