Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if array is empty

if (array && !array.length) {
    // array is defined but has no element
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #array #empty
ADD COMMENT
Topic
Name
6+2 =