Expert Developer JavaScript Question:
Download Job Interview Questions and Answers PDF
Explain the role of deferred scripts in JavaScript?
Answer:
By default, the parsing of the HTML code, during page loading, is paused until the script has not stopped executing. It means, if the server is slow or the script is particularly heavy, then the webpage is displayed with a delay. While using Deferred, scripts delays execution of the script till the time HTML parser is running. This reduces the loading time of web pages and they get displayed faster.
Download Expert JavaScript Developer Interview Questions And Answers
PDF
Previous Question | Next Question |
What is the function of delete operator? | Explain with an example the use of event handlers in JavaScript? |