I am trying to call an array in javascript from the input the user selects on the webpage..
<select id="weekdayOptions">
<option>Monday</option>
<option>Tuesday</option>
<option>Wednesday</option>
<option>Thursday</option>
<option>Friday</option>
</select>
javascript is ...
var selectDay = document.getElementById('weekdayOptions').value;
var Monday = ["hi" , "hello" , "test"];
var Tuesday = ["hi" , "hello" , "test"];
var Wednesday = ["hi" , "hello" , "test"];
var Thursday = ["hi" , "hello" , "test"];
var Friday = ["hi" , "hello" , "test"];
alert(selectDay[2]);
the values of the array are only the same for an example, in my code they are different, but what i am trying to do is call the array for the weekday chosen by the input of the user, hope i explained this clearly, any help is great, cheers.