MCPcopy Create free account
hub / github.com/caike/jQuery-Simple-Timer / diff

Function diff

tests/qunit-2.9.2.js:175–190  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

173
174 // Returns a new Array with the elements that are in a but not in b
175 function diff(a, b) {
176 var i,
177 j,
178 result = a.slice();
179
180 for (i = 0; i < result.length; i++) {
181 for (j = 0; j < b.length; j++) {
182 if (result[i] === b[j]) {
183 result.splice(i, 1);
184 i--;
185 break;
186 }
187 }
188 }
189 return result;
190 }
191
192 /**
193 * Determines whether an element exists in a given array or not.

Callers 1

checkPollutionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected