MCPcopy Create free account
hub / github.com/AyushSaini00/60minuteJavaScript / updateUI

Function updateUI

BMI-Calculator/app.js:50–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49//UPDATING UI
50function 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
60container.addEventListener('input', updateUI);

Callers

nothing calls this directly

Calls 2

calcBMIFunction · 0.85
checkCategoryFunction · 0.85

Tested by

no test coverage detected