JSFiddle - React, Tailwind, and code Playground
HTML
<select id="mySelect">
<option value="test1">test1</option>
<option value="test2" selected="selected">test2</option>
<option value="test3">test3</option>
</select>
JavaScript
var x = document.getElementById("mySelect").selectedIndex;
var y = document.getElementById("mySelect").options;
alert("Index: " + y[x].index + " is " + y[x].text);