Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if array is empty

const isNotEmpty = arr => Array.isArray(arr) && arr.length > 0;

isNotEmpty([1, 2, 3]);
// Result: true
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #javascript #check #array #empty
ADD COMMENT
Topic
Name
8+3 =