Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if array is empty

if (typeof array !== 'undefined' && array.length === 0) {
    // the array is defined and has no elements
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #array #empty
ADD COMMENT
Topic
Name
9+2 =