I need a JS that autoselect as default option the current year from this select-dropdown.
Now we are in 2022, so the defaul option must be 2022.
Thanks.
<select id="yearDP">
<option value="2021">2021</option>
<option value="2022">2022</option>
<option value="2022">2023</option>
<option value="2022">2024</option>
<option value="2022">2025</option>
<option value="2022">2026</option>
</select>