Friday, January 17, 2014

How to check if variable is null or empty string in JavaScript?



if(variable) {}

It will return false If variable is
empty string
NULL
undefined

No comments:

Post a Comment