This is a rather fundamental question but im looking for an optimal solution.I have 2 javascript String arrays. Lets say
A: ["Stark", "Targaryen", "Lannister", "Baratheon"]
B: ["Greyjoy", "Tyrell", "Stark"]
Since "Stark" is repeated, i want to remove it from array A and my result should be (with ordering preserved)
A: ["Targaryen", "Lannister", "Baratheon"]
I dont really care for the second array B. Is there something in core javascript or jQuery that would help me? PS: Don't post nested for loops with IF statements. Possibly something smarter :)