# Getting the selected option in JavaScript

Using everything learned, you can get the selected `option` tag as follows:

`let select = document.querySelector('#select'); console.log(select[select.selectedIndex]);`

Given a select and a button. By pressing the button, display the text of the marked list item.

Given a select and a button. Add an exclamation mark to the end of the selected item text when you click the button.

←→
↑
en ru