compact :: Array
compact() -> newArray
Returns a new version of the array, without any null/undefined values.
Example
['frank', , 'sue', , 'sally', null].compact()
// -> ['frank', 'sue', 'sally']
Prototype API 1.5.0 - prototypejs.org