Lodash.js - difference() function
A simple Lodash.js example of the difference() function, which deletes values in the first array provided by the second array.
1234567891011121314151617181920212223242526272829303132<!DOCTYPE html>charset="utf-8"name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"name="description" content="Tizen Angular.js example"Tizen lodash.js examplesrc="js/lodash.min.js"id="first"id="second"var firstDiv = document.getElementById('first');var secondDiv = document.getElementById('second');var firstValue = [1,2,6,2,1,23,1,2,2134,1,1,1];var secondValue = [1,2];var result = _.difference(firstValue, secondValue);firstDiv.innerHTML = "From the array " + firstValue + " we delete all the values specified in another array [1,2]...";secondDiv.innerHTML = "...and we get: " + result;