Vidyalelo
JavaScript · Q74

Invocation And Performance Navigation

Programming · JavaScript · question 74

Q74

What is the result when the showPerformanceMetrics() is called before loading the remote script?

A.
Throws an exception
B.
Throws an error
Answer
C.
It will load by itself
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
Solution:
If you try to make the call to perfLogger.showPerformanceMetrics() and the script hasn’t just loaded but also executed, then you will get an error.