Vidyalelo
JavaScript · Q23

Caching And Debugging

Programming · JavaScript · question 23

Q23

Why shouldn’t JavaScript functions not be too long?

A.
User friendliness
B.
Tie up event loops
C.
Browser becomes unresponsive
D.
All of the mentioned
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
The client-side JavaScript functions must not run too long: otherwise they will tie up the event loop and the web browser will become unresponsive to user input.