Is there a way to read and select the last index value in a drop-down using JavaScript?
Here is an example of the HTML code:
<select name="unqiue">
<option value="number:1" label="1">1</option>
<option value="number:2" label="2" selected="selected">2</option>
<option value="number:3" label="3">3</option>
<option value="number:4" label="4">4</option>
</select>
Please note that the values in the drop-down could vary, but I specifically need to programmatically select the last value '4'.