static/ext/src/lang/Array.js
function(arrayA, arrayB) {
            var clone = slice.call(arrayA),
                ln = clone.length,
                i, j, lnB;

            for (i = 0,lnB = arrayB.length; i < lnB; i++) {
                for (j = 0; j < ln; j++) {
                    if (clone[j] === arrayB[i]) {
                        erase(clone, j, 1);
                        j--;
                        ln--;
                    }
                }
            }

            return clone;
        }
function(arrayA, arrayB) {
            var clone = slice.call(arrayA),
                ln = clone.length,
                i, j, lnB;

            for (i = 0,lnB = arrayB.length; i < lnB; i++) {
                for (j = 0; j < ln; j++) {
                    if (clone[j] === arrayB[i]) {
                        erase(clone, j, 1);
                        j--;
                        ln--;
                    }
                }
            }

            return clone;
        }
function ( arrayA , arrayB ) { var clone = slice . call ( arrayA ) , ln = clone . length , i , j , lnB ; for ( i = 0 , lnB = arrayB . length ; i < lnB ; i ++ ) { for ( j = 0 ; j < ln ; j ++ ) { if ( clone [ j ] === arrayB [ i ] ) { erase ( clone , j , 1 ) ; j -- ; ln -- ; } } } return clone ; }
Perform a set difference A-B by subtracting all items in array B from array A.

@param {Array} arrayA
@param {Array} arrayB
@return {Array} difference
Perform a set difference A - B by subtracting all items in array B from array A .