250+ TOP MCQs on Integrating the Performance Object with perfLogger and Answers

JavaScript Assessment Questions and Answers on “Integrating the Performance Object with perfLogger”.

1. How many properties does a prototype object have?
a) 6
b) 7
c) 8
d) 9

Answer: b
Clarification: The prototype is an object that is associated with every functions and objects by default in JavaScript, where function’s prototype property is accessible and modifiable and object’s prototype property (aka attribute) is not visible. There are a total of 7 properties in the prototype object namely:

  1. perceivedTime
  2. redirectTime
  3. cacheTime
  4. dnsLookupTime
  5. tcpConnectionTime
  6. roundTripTime
  7. pageRenderTime.

2. 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()

Answer: c
Clarification: JSON.stringify does not serialize undefined values or functions within an object. JSON.stringify() converts a JavaScript object into a string.

3. How many properties are there in the interface PerformanceTiming?
a) 21
b) 22
c) 23
d) 24

Answer: a
Clarification: Performance.timing read-only property returns a PerformanceTiming object containing latency-related performance information. There are a total of 23 properties associated with the interface PerformanceTiming.

4. How many properties are there in window.performance object?
a) 1
b) 4
c) 2
d) 3

Answer: c
Clarification: The Window interface’s performance property returns a Performance object, which can be used to gather performance information about the current document. There are totally 2 properties associated with the window.performance and they are:

5. 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) Information about the page
d) Information of the curser

Answer: b
Clarification: The navigation tells how the user navigated to the page.

  250+ TOP MCQs on Scripting Java with Rhino and Answers

6. What is the purpose of the property PerformanceTiming.navigationStart?
a) Ready to end the navigation
b) Ready to jump the navigation
c) Ready for navigation
d) Ready to changing the navigation

Answer: c
Clarification: The PerformanceTiming.navigationStart read-only property returns an unsigned long long representing the moment, in milliseconds since the UNIX epoch, right after the prompt for unload terminates on the previous document in the same browsing context. If there is no previous document, this value will be the same as: PerformanceTiming.fetchStart.

7. Which of the following does JSON.stringify not serialize?
a) Undefined values
b) Functions within an object
c) Both Undefined values and Functions within an object
d) Functions outside the object

Answer: c
Clarification: JSON.stringify does not serialize undefined values or functions within an object. JSON.stringify() converts a JavaScript object into a string.

8. 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) Browser ready to fetch output

Answer: b
Clarification: The PerformanceTiming.fetchStart read-only property returns an unsigned long long representing the moment, in milliseconds since the UNIX epoch, the browser is ready to fetch the document using an HTTP request. If there is no previous document, this value will be the same as PerformanceTiming.fetchStart.

9. Which of the following property is associated with the Request event?
a) requestStart
b) requestEnd
c) both requestStart and requestEnd
d) requestchange

Answer: a
Clarification: The Request event has only one property: requestStart. The Request event has only one property: requestStart.

  250+ TOP MCQs on The Document Object Model and Answers

10. 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) Navigate API

Answer: c
Clarification: The Navigation Timing API provides data that can be used to measure the performance of a web site. The timing code is on the page, so it affects how the page loads and the time that takes. The Navigation Timing API can be used to get the timing without affecting the page loading process.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top