How to perform set related operations?
Hi, Does anyone have recommendation of the best way to achieve the following in javascript?
I have two set, one contains some numbers, the other contains some other numbers, e.g
set 1: contains 1, 3, 4, 5
set 2: contains 1, 2, 3, 4, 5
I want to know if set 1 contains all the numbers in set 2, if not, it is an error and I will alert the user.
What I really wanted to achieve is that I have several (identical) selection boxes on the left, and several (identical) selection boxes on the right, and I am mapping each item from the left selection box to something in the right selection boxes. And I want to make sure each and every item in the left selection box is chosen to be mapped to something on the right before I click submit.
Thanks for your help.
|