So i have two lists like this
<select id="list1">
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
<option value="5">five</option>
</select>
<select id="list2">
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
<option value="5">five</option>
</select>
if (answer < 7) {
greeting = "hello";
} else {
greeting = "Good bye";
}
Now what I want to happen is to add both selected values. I.e. 2+4. Then I want to take the answer from the addition (6) and use it in a if, else statement.
I'm new to coding so if you could help me that would be awesome. Or resources that can help would be awesome too. I learn majority from w3schools.com