1.

What is the result when the showPerformanceMetrics() is called before loading the remote script?(a) Throws an exception(b) Throws an error(c) It will load by itself(d) Throws an exception and It will load by itselfThis question was posed to me in semester exam.This interesting question is from Lazy Loading in chapter Invocation and Performance Navigation of JavaScript

Answer» CORRECT ANSWER is (b) Throws an ERROR

The BEST I can explain: perflogger.showPerformanceMetrics() tells the user about the performance parameters of the script loading. 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.


Discussion

No Comment Found

Related InterviewSolutions