JSFiddle - React, Tailwind, and code Playground
by Blueprinter
HTML
<select id="idWkChoice"><!-- select tag with only the first option -->
<option value="" disabled selected>Choose week</option>
</select>
JavaScript
var option;
var slctTagWeeks = document.getElementById('idWkChoice');//Get drop down element
var weeks = {
wk1:'Week One',
wk2:'Week Two',
wk3:'Week Three'
}
for (var k in weeks) {
thisID = k;
thisText = weeks[k];
option = document.createElement("option");
option.text = thisText;
option.value = thisID;//Add a value code that is different than the show text
slctTagWeeks.add(option);
}