Return to Snippet

Revision: 21880
at December 22, 2009 15:40 by magicrebirth

Initial Code
if (testarray.length <1) alert("array is empty");


if(A && A.length==0)

//or if you have other objects that A may be:

if(A && A.constructor==Array && A.length==0)

Initial URL

Initial Description

Initial Title
Check if array is empty in javascript

Initial Tags

Initial Language