utils/ScopeUtils.js
function processScopeVariables(variableDeclaration, loopVariables) {
    var identifiers = [], exclusiveCombination;

    _.forEach(variableDeclaration.declarations, function(declaration) {
        identifiers.push(declaration.id.name);
    });

    exclusiveCombination = _.xor(loopVariables, identifiers);
    return _.intersection(loopVariables, exclusiveCombination);
}
function processScopeVariables(variableDeclaration, loopVariables) {
    var identifiers = [], exclusiveCombination;

    _.forEach(variableDeclaration.declarations, function(declaration) {
        identifiers.push(declaration.id.name);
    });

    exclusiveCombination = _.xor(loopVariables, identifiers);
    return _.intersection(loopVariables, exclusiveCombination);
}
function processScopeVariables ( variableDeclaration , loopVariables ) { var identifiers = [ ] , exclusiveCombination ; _ . forEach ( variableDeclaration . declarations , function ( declaration ) { identifiers . push ( declaration . id . name ) ; } ) ; exclusiveCombination = _ . xor ( loopVariables , identifiers ) ; return _ . intersection ( loopVariables , exclusiveCombination ) ; }
Filters Identifiers within given variableDeclaration out of the loopVariables array.

Filtering occurs as follows:
XOR : (intermediate) result + variable identifiers found => a combined array minus identifiers that overlap
INTERSECTION: (intermediate) result + combined array to filter out variables that weren't in the original loopVariables array
@param {object} variableDeclaration declaration block of one or more variables
@param {loopVariables} loopVariables list of variables that are part of a loop invariable and should therefore not undergo mutations - unless overridden by another variable in the current function scope
Filters Identifiers within given variableDeclaration out of the loopVariables array .