Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js check if array is empty

if (typeof image_array !== 'undefined' && image_array.length > 0) {
    // the array is defined and has at least one element
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #check #array #empty
ADD COMMENT
Topic
Name
8+2 =