How do I check for null values in JavaScript?
Javascript is very flexible with regards to checking for “null” values. I’m guessing you’re actually looking for empty strings, in which case this simpler code will work: Which will check for empty strings (“”), null, undefined, false and the numbers 0 and NaN Please note that if you are specifically checking for numbers it is a common mistake to miss 0 with this method, … Read more