Error getting the selected value in Javascript : I am working on this project where I need to get the selected value from the user and and do a simple if - else. However, I'm not being able to get the value of the selected option from the user.

**Please don't mark this as duplicate, I tried many resources before I came here. I want a solution not go read this documentation either.**

```javascript
function getInsulinStrength() {
		
		let insulinSt = document.getElementById('insulinStrength'),
		 selectedNode = insulinSt.options[insulinSt.selectedIndex];
			
			if (selectedNode.value ==="Humalog"){
				insulinStrengthTotal = 1800;
			}
			else {
				insulinStrengthTotal = 1500;
			}

		return insulinStrengthTotal;
	}
```

This value needs to be put in the function below:

```javascript

	function doTheMath(){
		
		let carbIntake = getCurrentMeal();
		let cbs = getCurrentBloodSugar();
		let tbs = getTargetBloodSugar();
		let br = getBasalRate();
		let is = getInsulinStrength();
		
		
		let dailyBasalRate = br * 24;
		let gramsPerInsulin = 450 / dailyBasalRate;
		let bolus = carbIntake / gramsPerInsulin;
		
		if (cbs > tbs){
			let correctionFactor = is / dailyBasalRate;
			let correctionDose = (cbs - tbs) / correctionFactor;
			bolus += correctionDose;
		}
		
		return bolus;
	
	}

```

Everything else works minus the getInsulinStrength() function. Regardless of what the user chooses, it returns the same value.


I ADDED THE HTML CODE ~ just to make give more insight.



```html
<select id = "insulinStrength" name="insulinStrength" type="text" class="selectBtn" >
								<option value="">Select Insulin Type</option>
				                <option value="Novolog">Novolog</option>
				                <option value="Humalog">Humalog</option>
				                <option value="Apidra">Apidra</option>
				                <option value="Velosulin">Velosulin</option>
			   </select>	
```


The result is supposed to change when the user chooses Humalog. But the *results always stay the same for every single selected value*.