How to get a selected value from dropdown in JavaScript?

Getting the selected value from a dropdown menu in JavaScript can be achieved through various methods. One popular way is to use the `value` property of the `