// Selecting the 3rd option (Demo 2) const $select = document.querySelector('#mySelect'); $select.value = $select.querySelector('option')[2].value;