compactArraypublic
Defined in packages/ember-runtime/lib/mixins/enumerable.js:774
Returns a copy of the array with all null and undefined elements removed. let arr = ['a', null, 'c', undefined];
arr.compact(); // ['a', 'c']
Returns:
Array
the array without null and undefined elements.