Ask Question
14 December, 03:46

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.

+4
Answers (1)
  1. 14 December, 06:19
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers