Here is a quick tip for JavaScript falsy conditions for programmers or for people who come from Java or C#. In Java and C# when we thinks of using a compare conditions in a if statements, we tend to use something along the line of:
1 2 3 |
if(val != null && val.length > 0) { //do stuff } |
We tend to bring this baggage of knowledge to […]