Javascript Array menus(otherArray)

Description

Javascript Array menus(otherArray)

Array.prototype.menus = function (otherArray) {
    menusArray = [];/*from   w  w  w . j  a v a 2 s.co m*/
    for (var i = 0; i < this.length; i++) {
        if (otherArray.contains(this[i]))
            continue;
        menusArray.push(this[i]);
    }

    return menusArray;
};



PreviousNext

Related