Tell us what’s happening:
Describe your issue in detail here.
Pls, I am having a hard time deciding what to do. I think I should join both arrays and iterate through it for repetitions but I am stuck on how to nest the iterations
So the problem says that we have to find those entries in the second array that are not in the first array, and those entries in the first array that are not in the second array.
There are many ways of solving this problem:
Concatenate both arrays and remove those duplicated elements (very good solution)
Classical programming: Two for. The first one loops the first array to find elements that are not in the second, and viceversa.
Array filters: use filterfunction to filter out those entries that are already in the other array.
I think your solution is very good. Now you have to remove duplicates. Just google search “remove duplicates js array”.
Here is a good resource: