Skip to content

Instantly share code, notes, and snippets.

View bush's full-sized avatar
💭
Working in cta-services repo

Dave Bush bush

💭
Working in cta-services repo
View GitHub Profile
Array.prototype.diff = function(arr2) { return this.filter(x => !arr2. includes(x)); }
let arr1 = ['release','layer-1','bsp-1']
console.log(`OG list: ${arr1}`);
let arr2 = ['release','layer-2','bsp-1']
console.log(`New list: ${arr2}`);
console.log(`Remove list: ${arr1.diff(arr2)}`);
let newDl = arr2.diff(arr1);
console.log(`New downlowd list: ${newDl}`);
console.log(`Refresh list: ${arr2.diff(newDl)}`);