Javascript Array filerUndefined()

Description

Javascript Array filerUndefined()


/**//from  w w w  .  ja va2  s .c o m
 * Filters an array and return what's defined
 * @return {Mixed} The result
 */
Array.prototype.filerUndefined = function () {
    return this.filter(item => item !== undefined);
};



PreviousNext

Related