Except two Array - Node.js Array

Node.js examples for Array:Set Operation

Description

Except two Array

Demo Code


Array.prototype.except = function( v ) {
    var res = [];
    for ( var i = 0, n = this.length; i < n; i++ )
        if ( this[ i ] !== v ) res.push( this[ i ] )
    return res;//from   w ww . j a  va 2 s.  c  o m
}

Related Tutorials