Comparing the contents of 2 arrays

Hey guys, i cant seem to do this:

firstArray = new Array(item1, item2, item3, item4);
secondArray = new Array (item1, item1, item4, item2);

I basically need to compare the contents of these 2 arrays.

For example when im finished, id like the output to be:

//firstArray   item3
//secondArray  item1

Essentially cancelling each other out.

The situation is a girl with a tray and a table. Im comparing what is on the users tray (firstArray) with what they have ordered (secondArray).

Ill be removing the graphics from firstArray and reducing the content of the secondArray.

So i still need an item1 to complete the order.

Jesus, this “dash” game is complex for me!