JSFiddle - React, Tailwind, and code Playground

HTML

<button id="get">get</button>

<div></div>
<select id="bbb">
    <option>xyz</option>
    <option value="abcdx_val">abcdx</option>    
</select>

CSS

div{
    width:200px;
    height:200px;
    background:green;
    border:2px solid black;
}

JavaScript

$('#get').click(function() {
    var bbbEl = document.getElementById('bbb');
    var selectedOptionEl = bbbEl.options[bbbEl.selectedIndex];
    var x = selectedOptionEl.value || selectedOptionEl.text;
    alert(x);
});