1 2 var fruits = ['orange', 'citron', 'banane', null, 'noix', '', undefined, 'fraise']; var fruits_filtre = fruits.filter( function(val){return val !== ''} );