Need Help in Select tag using JS(DOM)

I don’t know how to display Specific Information … When I select from the option and hit the button … Specific Info should display of the selected option …
I hope you guys understand my poor explanation :frowning:

code link: https://codepen.io/bilal-shuja/pen/jOrppdX?editors=1010

^ Answering this would be helpful.

You need to add an event listener to the select element and listen for the “change” event. Then you can get, for example, the values (0,1,2).

document.getElementById('mySelection').addEventListener('change', (e) => {
  console.log(e.target.value)
})

If I select Pakistan from the drop down … and click … The declared array**(Provinces = [‘Balochistan’, ‘Punjab’, ‘Sindh’, ‘Khyber Pakhtunkhwa’])** info should display !!

I’m trying !! but failed to solve my problem yet :frowning: