// @florinrelea const selectElementId = 'example' const htmlOptionsCollections = document.getElementById(selectElementId).options const options = Array.from(htmlOptionsCollections).map(el=> el.textContent) console.log(options)