is there any function like string.isnullorempty() in javascript

uzay95 picture uzay95 · Oct 20, 2010 · Viewed 29.1k times · Source

I always (thing != undefined || thing != null)?...:...; check. Is there any method will return bool after this check in javascript or jquery ?

And how would you add this check in jquery as a function?

Answer

femseks picture femseks · Oct 20, 2010
if (thing)
{
   //your code
}

Is that what you are looking for?