Simpler union sets, intersections, and unions

is the simplest math problem: finding the set, intersection and union of two arrays.
I know you can use for loops, but is there an easier way?

var arr1 = [3, 5, 1];
var arr2 = [2, 5, 7];
......
Mar.13,2021

  

an easier way is to use wheels built by others
recommended lodash

Menu