InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
What does the method Performance.now() return?(a) DOMTimeStamp(b) DOMHighResTimeStamp(c) DOM\Stamp(d) TimeStampI got this question in an online quiz.The origin of the question is Invocation of the Performance Object topic in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» The correct choice is (B) DOMHighResTimeStamp |
|
| 52. |
Which of the following property is associated with the Processing event?(a) domComplete(b) domContentLoaded(c) domInteractive(d) domloadI had been asked this question in quiz.My question is taken from Invocation of the Performance Object in portion Invocation and Performance Navigation of JavaScript |
|
Answer» The correct choice is (d) domload |
|
| 53. |
Which of the following does not serialize the undefined values or objects within an object?(a) JSON.string(b) JSON(c) JSON.stringify(d) JSON.change()The question was posed to me by my school teacher while I was bunking the class.My question is taken from Integrating the Performance Object with perfLogger topic in section Invocation and Performance Navigation of JavaScript |
|
Answer» The correct answer is (c) JSON.stringify |
|
| 54. |
What is the purpose of holding whatever tag you create in the attribute type?(a) To have more information(b) To identify the scripting language(c) To store data(d) To store variable nameI had been asked this question in a national level competition.My query is from Lazy Loading topic in portion Invocation and Performance Navigation of JavaScript |
|
Answer» Correct answer is (b) To identify the SCRIPTING language |
|
| 55. |
How is the render time calculated?(a) Date.Now()(b) Date.Now() – performance.timing.domLoading(c) performance.domLoading(d) Date.Now() – performance.domLoadingThe question was posed to me in an interview.Origin of the question is Lazy Loading topic in division Invocation and Performance Navigation of JavaScript |
|
Answer» Right choice is (B) Date.Now() – performance.timing.domLoading |
|
| 56. |
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. |
|
| 57. |
What is the purpose of lazy loading?(a) Immediate loading is necessary(b) Loading under command(c) Immediate loading is not necessary(d) Loading after a definite intervalThe question was posed to me in an interview.The origin of the question is Lazy Loading in portion Invocation and Performance Navigation of JavaScript |
|
Answer» Correct choice is (c) Immediate LOADING is not necessary |
|
| 58. |
What is the method to create a data frame?(a) frame(data)(b) frameData()(c) data.frame()(d) frame.Data()This question was posed to me during an online interview.My question is based upon Script Loading topic in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» Correct answer is (c) DATA.frame() |
|
| 59. |
What should be the type of script_url?(a) Object(b) String(c) Array(d) Any of the mentionedI got this question at a job interview.My query is from Script Loading topic in section Invocation and Performance Navigation of JavaScript |
|
Answer» The CORRECT answer is (d) Any of the mentioned |
|
| 60. |
What will happen if the browser encounters a script tag without an src attribute?(a) Throws an error(b) Throws an exception(c) Sends it to the compiler(d) Sends it to the interpreterThis question was addressed to me by my college director while I was bunking the class.Origin of the question is Script Loading topic in portion Invocation and Performance Navigation of JavaScript |
|
Answer» The correct CHOICE is (d) Sends it to the interpreter |
|
| 61. |
What is the initial step to set up a CSS Lazy Loading?(a) Fetching data(b) Loading the script(c) Loading the page(d) Adding the event listenerThis question was posed to me during an online exam.This question is from Lazy Loading topic in portion Invocation and Performance Navigation of JavaScript |
|
Answer» Right option is (a) Fetching data |
|
| 62. |
When does the browser stop rendering the HTML?(a) Inline JavaScript block(b) External JavaScript file(c) Both Inline JavaScript block & External JavaScript file(d) External HTML fileThis question was addressed to me during an interview.My doubt is from Page Render BottleNecks Optimization in portion Invocation and Performance Navigation of JavaScript |
|
Answer» RIGHT CHOICE is (c) Both Inline JavaScript block & External JavaScript file Easy explanation: When the BROWSER parses the HTML markup, it stops rendering the HTML when it ENCOUNTERS an inline JavaScript block or external JavaScript file. At this point, the user experiences rendering delays. |
|
| 63. |
Which of the following property is associated with the Request event?(a) requestStart(b) requestEnd(c) both requestStart and requestEnd(d) requestchangeThe question was posed to me at a job interview.Query is from Integrating the Performance Object with perfLogger in section Invocation and Performance Navigation of JavaScript |
|
Answer» CORRECT answer is (a) REQUESTSTART Easiest explanation: The REQUEST EVENT has only one property: requestStart. The Request event has only one property: requestStart. |
|
| 64. |
How to lazy load images?(a) Remove the rel attribute(b) Remove the src attribute(c) Make rel = src(d) Make src = relThe question was asked during an interview.I would like to ask this question from Lazy Loading in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» Correct answer is (b) Remove the SRC ATTRIBUTE |
|
| 65. |
How to get a particular value using the tagged name?(a) getElementbyID()(b) getElementsbyName()(c) getElementsbyTagName()(d) getTagName()I have been asked this question in an internship interview.The question is from Script Loading topic in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» Correct option is (c) getElementsbyTagName() |
|
| 66. |
What are the parameters of the attachEvent function?(a) Function(b) Function, Event(c) Event, Function(d) EventThe question was asked in semester exam.The origin of the question is Lazy Loading topic in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» Correct option is (c) Event, Function |
|
| 67. |
How many properties are there in window.performance object?(a) 1(b) 4(c) 2(d) 3The question was asked during an interview for a job.This is a very interesting question from Integrating the Performance Object with perfLogger in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» The CORRECT CHOICE is (c) 2 |
|
| 68. |
Which of the following is an interface?(a) Time(b) Timing(c) Performance(d) PerformanceTimingThe question was asked in class test.I would like to ask this question from Invocation of the Performance Object topic in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» Correct choice is (d) PerformanceTiming |
|
| 69. |
What is the purpose of the method createDocumentFragment()?(a) Creates a fragment object(b) Creates a document fragment(c) Creates imaginary node object(d) Create a node fragmentI had been asked this question in final exam.Enquiry is from Script Loading topic in division Invocation and Performance Navigation of JavaScript |
|
Answer» Correct choice is (c) Creates IMAGINARY node object |
|
| 70. |
What is the type of datatype the async attribute optionally accepts?(a) Integer(b) String(c) Boolean(d) DecimalThe question was posed to me in class test.This interesting question is from Script Loading topic in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» Correct answer is (C) Boolean |
|
| 71. |
Which is the next step after retrieving the content in chunks?(a) Paint DOM elements(b) Parse Content(c) Build DOM nodes in render tree(d) Layout positioning of DOM elementsThis question was addressed to me in unit test.I would like to ask this question from Page Render BottleNecks Optimization in division Invocation and Performance Navigation of JavaScript |
|
Answer» Right CHOICE is (b) Parse Content |
|
| 72. |
Which of the following gets converted to DOM elements by the rendering engine?(a) Tokens(b) Strings(c) Address(d) CharactersThis question was addressed to me in an interview.My doubt is from Page Render BottleNecks Optimization topic in section Invocation and Performance Navigation of JavaScript |
|
Answer» The correct OPTION is (a) Tokens |
|
| 73. |
Why are HTTP redirects significant?(a) TCP connection available(b) Complete roundtrip absent(c) Complete roundtrip present(d) TCP connection not availableThis question was addressed to me in an internship interview.The question is from Performance Navigation and Memory topic in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» Right option is (b) Complete ROUNDTRIP absent |
|
| 74. |
What does it indicate when the type attribute of the navigation object is set to 2?(a) Navigation by moving back through history(b) Navigation by moving forward through history(c) Navigation by moving back & forward through history(d) Navigation by moving in favoritesI got this question by my college professor while I was bunking the class.This question is from Invocation of the Performance Object topic in division Invocation and Performance Navigation of JavaScript |
|
Answer» The CORRECT choice is (c) Navigation by moving back & forward through history |
|
| 75. |
Which of the following is an attribute to the script object?(a) onclick(b) onload(c) onshow(d) onhoverI had been asked this question in my homework.This intriguing question originated from Lazy Loading in section Invocation and Performance Navigation of JavaScript |
|
Answer» Right choice is (B) onload |
|
| 76. |
Which is the method used to add an event listener?(a) addEventListener()(b) addListener()(c) addEvent(Listener)(d) addListener(Event)I have been asked this question in exam.My question comes from Lazy Loading topic in division Invocation and Performance Navigation of JavaScript |
|
Answer» Right ANSWER is (a) ADDEVENTLISTENER() |
|
| 77. |
Which of the following constants hold the value 2?(a) TYPE_NAVIGATE(b) TYPE_RELOAD(c) TYPE_BACK_FORWARD(d) TYPE_RESERVEDI had been asked this question in homework.My doubt is from Performance Navigation and Memory in section Invocation and Performance Navigation of JavaScript |
|
Answer» Right answer is (c) TYPE_BACK_FORWARD |
|
| 78. |
How many read-only attributes are present in the navigator object?(a) 1(b) 2(c) 3(d) 4I have been asked this question in an interview for internship.Enquiry is from Performance Navigation and Memory topic in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» The CORRECT option is (b) 2 |
|
| 79. |
Which of the following computation is correct to calculate the time taken for page load once the page is received from the server?(a) responseEnd-loadEventEnd(b) loadEventEnd-responseEnd(c) loadEventEnd/responseEnd(d) responseEnd/loadEventEndI have been asked this question in an interview for internship.The query is from Invocation of the Performance Object topic in portion Invocation and Performance Navigation of JavaScript |
|
Answer» Correct answer is (b) loadEventEnd-responseEnd |
|
| 80. |
Which of the following property is associated with the Response event?(a) responseStart(b) responseEnd(c) both responseStart and responseEnd(d) responsiveStartI have been asked this question in a national level competition.The doubt is from Invocation of the Performance Object in chapter Invocation and Performance Navigation of JavaScript |
|
Answer» The correct answer is (C) both responseStart and responseEnd |
|