Invocation And Performance Navigation(Computer Science > Javascript ) Questions and Answers
Question 1. What is the purpose of lazy loading?
Immediate loading is necessary
Loading under command
Immediate loading is not necessary
None of the mentioned
Explanation:-
Answer: Option C. -> Immediate loading is not necessary
Question 2. Where is the external JavaScript placed in the case of lazy loading?
After window.onload event
Before window.onload event
All of the mentioned
None of the mentioned
Explanation:-
Answer: Option A. -> After window.onload event
Question 3. What are the parameters of the attachEvent function?
Function
Function, Event
Event, Function
Event
Explanation:-
Answer: Option C. -> Event, Function
Question 4. What is the result when the showPerformanceMetrics() is called before loading the remote script?
Throws an exception
Throws an error
It will load by itself
None of the mentioned
Explanation:-
Answer: Option B. -> Throws an error
Question 5. Which of the following is an attribute to the script object?
onclick
onload
onshow
all of the mentioned
Explanation:-
Answer: Option B. -> onload
Question 6. Which is the method used to add an event listener?
addEventListener()
addListener()
addEvent(Listener)
addListener(Event)
Explanation:-
Answer: Option A. -> addEventListener()
Question 7. What is the purpose of the domLoading attribute?
Document exists
Document can load
Document has loaded
Document begins to load
Explanation:-
Answer: Option D. -> Document begins to load
Question 8. How is the render time calculated?
Date.Now()
Date.Now() – performance.timing.domLoading
performance.domLoading
Date.Now() – performance.domLoading
Explanation:-
Answer: Option B. -> Date.Now() – performance.timing.domLoading
Question 9. The object whose properties are inherited by all instances of the class, and properties whose values are functions behaving like instance methods of the class, is
Instance object
Constructor object
Destructor object
Prototype object
Explanation:-
Answer: Option D. -> Prototype object
Question 10. You can refresh the webpage in JavaScript by using