Ask Question

5. What would the browser display if the following code were executed in a script? a var product = 0; while (product < = 25); product = 2 + product; a) nothing, the script would result in an inifite-loop error b) 0 c) 25 d) 26

+5
Answers (1)
  1. 9 January, 18:32
    0
    An infinite-loop

    Explanation:

    This is because the condition is always true ie: product is always less than 25. And once there is no sentinel to stop the loop it will run forever.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “5. What would the browser display if the following code were executed in a script? a var product = 0; while (product < = 25); product = 2 + ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers