I have this html code:

```
<select id="s1">
  <option value="volvo" id="o1">Volvo</option>
  <option value="saab" id="o2">Saab</option>
  <option value="opel" id="o3">Opel</option>
  <option value="audi" id="o4">Audi</option>
</select>    

<select id="s2">
  <option value="Toyota" id="o5">Toyota</option>
  <option value="Porsche" id="o6">Porsche</option>
  <option value="Suzuki" id="o7">Suzuki</option>
  <option value="Mahindra" id="o8">Mahindra</option>
</select>

```

I want to create an array which stores the id of the selected option. Each selected option is stored in an array in such a way that it removes the previous id of the option and replaces it with the new one. If I change an option the previous id should be removed and replaced with the new one. Since there are two select boxes, at the end, the array should contain two ids i.e ids of the two options.

Can anyone please tell me how can I do this?