Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js array remove undefined values

const a = [3,,null, false, undefined, 1];

// Remove falsey
a.filter(Boolean);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #array #remove #undefined #values
ADD COMMENT
Topic
Name
4+8 =