Skip to content

Instantly share code, notes, and snippets.

@ahmehri
Created June 12, 2018 16:56
Show Gist options
  • Save ahmehri/a2c30c7e7aa1db7cfbf41f5ae082434a to your computer and use it in GitHub Desktop.
Save ahmehri/a2c30c7e7aa1db7cfbf41f5ae082434a to your computer and use it in GitHub Desktop.
const _ = require('lodash');
let original = [1, 2];
// 2 has been removed, 3 has been added
let after = [1, 3];
console.log('removal:', _.difference(original, after));
console.log('addition:', _.difference(after, original));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment