I have two arrays that I need to check against each other and if they have reached a point where both items in each array are actually the same as one another, then append s
Hi using lodash or underscore you can easily intersection two array.
_.intersection([2, 1], [2, 3]);
Result is [2].
Lodash document: https://lodash.com/docs/4.17.2#intersection