()
| 48 | |
| 49 | //UPDATING UI |
| 50 | function updateUI(){ |
| 51 | calcBMI(); |
| 52 | //checks if bmiMetric is finite or not (NaN , infinity) |
| 53 | if(isFinite(bmiMetric)){ |
| 54 | bmiElem.innerHTML = bmiMetric; |
| 55 | } |
| 56 | bmiCategoryElem.innerHTML = checkCategory(bmiMetric); |
| 57 | } |
| 58 | |
| 59 | //WHENEVER USER INPUTS SOMETHING IN THE CONTAINER, INVOKE UPDATEUI FUNCTION |
| 60 | container.addEventListener('input', updateUI); |
nothing calls this directly
no test coverage detected