Reload control using loop
The two first things that come to my mind:

Using template strings
Modifying the dropdown HTML once:

$(document).ready(function () {
    $(&quot;#ddlReleaseYears&quot;).change(function () {
        var data = &quot;[2021,2020,2019,2018,2017,2016]&quot;;
        var arr = JSON.parse(data);
        $('#toptitle').text(arr[0]);
        var HTML = &quot;&quot;
        $.each(arr, function (index, value) {
            HTML += `&lt;option value=&quot;${value}&quot;&gt;${value}&lt;/option&gt;`
        });
        // No need to set the html to &quot;&quot; and then append
        $(&quot;#ddlReleaseYears&quot;).html(HTML);
     })
});