

MCQOPTIONS
Saved Bookmarks
This section includes 133 Mcqs, each offering curated multiple-choice questions to sharpen your Javascript knowledge and support exam preparation. Choose a topic below to get started.
51. |
Which of the following API can be used to get the timing without affecting the page loading process?%! |
A. | Navigation API |
B. | Timing API |
C. | Navigation Timing API |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
52. |
Which of the following is an attribute to the script object?%! |
A. | onclick |
B. | onload |
C. | onshow |
D. | all of the mentioned |
Answer» C. onshow | |
53. |
*$_What should be the type of the script_url?? |
A. | Object |
B. | String |
C. | Array |
D. | Any of the mentioned |
Answer» E. | |
54. |
*$_What is the method used to create an element in the HTML DOM?? |
A. | createDOMelement() |
B. | createElement() |
C. | createDOMElement() |
D. | none of the mentioned |
Answer» C. createDOMElement() | |
55. |
*$_What would happen if there were no script tags?? |
A. | Build DOM nodes in render tree |
B. | Layout positioning of DOM elements |
C. | Paint DOM elements |
D. | Execute script |
Answer» B. Layout positioning of DOM elements | |
56. |
*$_Which of the following navigator object properties is the same in both Netscape and IE?? |
A. | navigator.appCodeName |
B. | navigator.appName |
C. | navigator.appVersion |
D. | none of the mentioned |
Answer» B. navigator.appName | |
57. |
*$_To define each of the set classes as a property of the sets object (namespace) for the module, the statement is? |
A. | sets = sets.AbstractEnumerableSet.extend(); |
B. | sets.SingletonSet = sets.AbstractEnumerableSet.extend(...); |
C. | sets.SingletonSet = sets.extend(...); |
D. | sets = sets.extend(...); |
Answer» C. sets.SingletonSet = sets.extend(...); | |
58. |
*/*_How to lazy load images?? |
A. | Remove the rel attribute |
B. | Remove the src attribute |
C. | Make rel = src |
D. | Make src = rel |
Answer» C. Make rel = src | |
59. |
*/*_You can refresh the webpage in JavaScript by using? |
A. | window.reload |
B. | location.reload |
C. | window.refresh |
D. | page.refresh |
Answer» C. window.refresh | |
60. |
*/*_How many constant values can the property type be represented?? |
A. | 2 |
B. | 3 |
C. | 4 |
D. | 5 |
Answer» D. 5 | |
61. |
*/*_Which of the following API can be used to get the timing without affecting the page loading process?? |
A. | Navigation API |
B. | Timing API |
C. | Navigation Timing API |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
62. |
*/*_What is the purpose of the navigation property in the window.performance object?? |
A. | To which page the user navigated |
B. | How the user navigated |
C. | All of the mentioned |
D. | None of the mentioned |
Answer» C. All of the mentioned | |
63. |
*/*_Which keyword must be used to get a more granular insight of the memory usage?? |
A. | verb |
B. | verbose |
C. | granule |
D. | none of the mentioned |
Answer» C. granule | |
64. |
*/*_Which of the following layer retrieves the content from the network?? |
A. | Transport Layer |
B. | Application Layer |
C. | Network Layer |
D. | Physical Layer |
Answer» D. Physical Layer | |
65. |
*/*_How many properties are associated with the Response event?? |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» C. 3 | |
66. |
*/*_What is the purpose of garbage collection?? |
A. | Removes object with many reference |
B. | Removes object with reference |
C. | Removes object with invalid reference |
D. | Removes object with no reference |
Answer» E. | |
67. |
*/*_Where does the DNS Lookup direct to ?? |
A. | Browser |
B. | Client |
C. | Server |
D. | DNS Server |
Answer» E. | |
68. |
*/*_Which of the following is an attribute to the script object?? |
A. | onclick |
B. | onload |
C. | onshow |
D. | all of the mentioned |
Answer» C. onshow | |
69. |
*/*_Which of the following property is associated with the Processing event?? |
A. | domComplete |
B. | domContentLoaded |
C. | domInteractive |
D. | none of the mentioned |
Answer» E. | |
70. |
*/*_How to get a particular value using the tagged name?? |
A. | getElementbyID() |
B. | getElementsbyName() |
C. | getElementsbyTagName() |
D. | getTagName() |
Answer» D. getTagName() | |
71. |
*/*_What will happen after executing the script?? |
A. | Execute script |
B. | Layout positioning of DOM elements |
C. | Paint DOM elements |
D. | Build DOM nodes in render tree |
Answer» E. | |
72. |
*/*_What is the purpose of creating a data frame?? |
A. | Hold the page render time |
B. | Hold the load time |
C. | Hold the page render time & load time |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
73. |
*/*_When the “end” event fires on EOF when no more data will arrive, which function is called?? |
A. | s.on("data",f); |
B. | s.on("end",f); |
C. | s.on("error",f); |
D. | s.on("default",f); |
Answer» C. s.on("error",f); | |
74. |
*/*_What is the type of datatype the async attribute optionally accepts?? |
A. | Integer |
B. | String |
C. | Boolean |
D. | Decimal |
Answer» D. Decimal | |
75. |
_ How to get a particular value using the tagged name?$? |
A. | getElementbyID() |
B. | getElementsbyName() |
C. | getElementsbyTagName() |
D. | getTagName() |
Answer» D. getTagName() | |
76. |
_ What is the type of datatype the async attribute optionally accepts?$? |
A. | Integer |
B. | String |
C. | Boolean |
D. | Decimal |
Answer» D. Decimal | |
77. |
_ What will happen after executing the script?$? |
A. | Execute script |
B. | Layout positioning of DOM elements |
C. | Paint DOM elements |
D. | Build DOM nodes in render tree |
Answer» E. | |
78. |
_ What is the purpose of creating a data frame?$? |
A. | Hold the page render time |
B. | Hold the load time |
C. | Hold the page render time & load time |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
79. |
_ When the “end” event fires on EOF when no more data will arrive, which function is called?$? |
A. | s.on("data",f); |
B. | s.on("end",f); |
C. | s.on("error",f); |
D. | s.on("default",f); |
Answer» C. s.on("error",f); | |
80. |
_ What should be the value of the type attribute of a variable if the type of file is CSS?$? |
A. | text/js/css |
B. | text/js |
C. | text/css |
D. | text |
Answer» D. text | |
81. |
_ 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$? |
A. | Instance object |
B. | Constructor object |
C. | Destructor object |
D. | Prototype object |
Answer» E. | |
82. |
_ How can one access the redirectCount property?$? |
A. | navigation.redirectCount |
B. | performance.navigation.redirectCount |
C. | performance.redirectCount |
D. | redirectCount |
Answer» C. performance.redirectCount | |
83. |
_ Which of the following property is associated with the Request event?$? |
A. | requestStart |
B. | requestEnd |
C. | both requestStart and requestEnd |
D. | none of the mentioned |
Answer» B. requestEnd | |
84. |
_ How many properties are there in window.performance object?$? |
A. | 1 |
B. | 4 |
C. | 2 |
D. | 3 |
Answer» D. 3 | |
85. |
_ Which of the following gives the high level breakdown of memory usage?$? |
A. | about:memory |
B. | memory |
C. | about-memory |
D. | about::memory |
Answer» B. memory | |
86. |
_ Which of the following runs the JavaScript code?$? |
A. | Just In Time compiler |
B. | JavaScript Interpreter |
C. | Both Just In Time compiler and JavaScript Interpreter |
D. | None of the mentioned |
Answer» C. Both Just In Time compiler and JavaScript Interpreter | |
87. |
_ Which of the following is an interface?$? |
A. | Time |
B. | Timing |
C. | Performance |
D. | PerformanceTiming |
Answer» E. | |
88. |
_ What is the command to access the Heap size limit?$? |
A. | performance.memory. SizeLimit |
B. | performance.memory. jsHeapSizeLimit |
C. | jsHeapSizeLimit |
D. | performance.jsHeapSizeLimit |
Answer» C. jsHeapSizeLimit | |
89. |
_ Which of the following constants hold the value 2?$? |
A. | TYPE_NAVIGATE |
B. | TYPE_RELOAD |
C. | TYPE_BACK_FORWARD |
D. | TYPE_RESERVED |
Answer» D. TYPE_RESERVED | |
90. |
_ 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. | None of the mentioned |
Answer» C. It will load by itself | |
91. |
_ 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/loadEventEnd |
Answer» C. loadEventEnd/responseEnd | |
92. |
_What is the solution to the absence of a script tag without an src attribute?$? |
A. | Resend the scripts |
B. | Create inline JavaScript |
C. | All of the mentioned |
D. | None of the mentioned |
Answer» C. All of the mentioned | |
93. |
_What is the purpose of the startTimeLogging() method?$? |
A. | Start the timer |
B. | Capture time logging |
C. | Capture timing data for referencing |
D. | All of the mentioned |
Answer» E. | |
94. |
_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. | None of the mentioned |
Answer» C. Build DOM nodes in render tree | |
95. |
_What is the method to create a data frame ?$? |
A. | frame(data) |
B. | frameData() |
C. | data.frame() |
D. | none of the mentioned |
Answer» D. none of the mentioned | |
96. |
_What is the purpose of the method localeCompare()?$? |
A. | If the reference string comes before or after another string |
B. | If the reference string is validated |
C. | If the string is a reference string |
D. | None of the mentioned |
Answer» B. If the reference string is validated | |
97. |
_What does the appendChild() method perform?$? |
A. | Appends a node in the middle of the index taken as the parameter |
B. | Appends a node as the first child |
C. | Appends a node as the last child |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
98. |
_How is the render time calculated?$? |
A. | Date.Now() |
B. | Date.Now() – performance.timing.domLoading |
C. | performance.domLoading |
D. | Date.Now() – performance.domLoading |
Answer» C. performance.domLoading | |
99. |
Where does the DNS reply go to in a single HTTP redirect?$? |
A. | Browser |
B. | Client |
C. | Server |
D. | DNS Server |
Answer» B. Client | |
100. |
What is the purpose of the property PerformanceTiming.fetchStart?$? |
A. | Browser ready to fetch input |
B. | Browser ready to fetch document |
C. | Browser ready to fetch summary |
D. | All of the mentioned |
Answer» C. Browser ready to fetch summary | |