21
rated 0 times
[
23]
[
2]
/ answers: 1 / hits: 23767
/ 8 Years ago, tue, december 6, 2016, 12:00:00
So I have two arrays:
const allLanguages = [ 'ES', 'EN', 'DE' ]
const usedLanguages = [ { id: 1, lang: 'EN' } ]
What's the quickest way to produce a new array which is the difference between these two? In old school JavaScript, you'd have to do a for loop inside another for loop, I think...
Eg:
const availableLanguages = [ 'ES', 'DE' ]
More From » arrays