Ask Question
16 May, 06:50

What message will be displayed after the execution of the following code segment?

var BMI = 18;

if (BMI>18.5)

alert ("Overweight");

else

alert ("Underweight");

Overweight

Underweight

Both Overweight and Underweight

randomly display either Overweight or Underweight.

+5
Answers (1)
  1. 16 May, 07:31
    0
    The correct answer for the given question is "Underweight"

    Explanation:

    As the code is written in jа vascript, we see that var BMI hold the value 18, so In the if block we check the condition "18>18.5 " this condition is false so it executed the else block i. e it print " Underweight".

    So the correct answer for the following code is " Underweight"
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What message will be displayed after the execution of the following code segment? var BMI = 18; if (BMI>18.5) alert ("Overweight"); else ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers