Getting the selected option in JavaScript

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

javascriptlet select = document.querySelector('#select');
console.log(select[select.selectedIndex]);
Задание 1

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

Задание 2

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