Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove undefined from javascript array map

var data = [42, 21, undefined, 50, 40, undefined, 9];

data = data.filter(function( element ) {
   return element !== undefined;
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #undefined #javascript #array #map
ADD COMMENT
Topic
Name
7+5 =