Invocation And Performance Navigation Questions MCQs


invocation and performance navigation Questions

Total Questions : 88

Page 1 of 5 pages
Question 1. What is the purpose of lazy loading?
  1.    Immediate loading is necessary
  2.    Loading under command
  3.    Immediate loading is not necessary
  4.    None of the mentioned
Answer: Option C
Question 2. Where is the external JavaScript placed in the case of lazy loading?
  1.    After window.onload event
  2.    Before window.onload event
  3.    All of the mentioned
  4.    None of the mentioned
Answer: Option A
Question 3. What are the parameters of the attachEvent function?
  1.    Function
  2.    Function, Event
  3.    Event, Function
  4.    Event
Answer: Option C
Question 4. What is the result when the showPerformanceMetrics() is called before loading the remote script?
  1.    Throws an exception
  2.    Throws an error
  3.    It will load by itself
  4.    None of the mentioned
Answer: Option B
Question 5. Which of the following is an attribute to the script object?
  1.    onclick
  2.    onload
  3.    onshow
  4.    all of the mentioned
Answer: Option B
Question 6. Which is the method used to add an event listener?
  1.    addEventListener()
  2.    addListener()
  3.    addEvent(Listener)
  4.    addListener(Event)
Answer: Option A
Question 7. What is the purpose of the domLoading attribute?
  1.    Document exists
  2.    Document can load
  3.    Document has loaded
  4.    Document begins to load
Answer: Option D
Question 8. How is the render time calculated?
  1.    Date.Now()
  2.    Date.Now() – performance.timing.domLoading
  3.    performance.domLoading
  4.    Date.Now() – performance.domLoading
Answer: Option B
Question 9. 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
  1.    Instance object
  2.    Constructor object
  3.    Destructor object
  4.    Prototype object
Answer: Option D
Question 10. You can refresh the webpage in JavaScript by using
  1.    window.reload
  2.    location.reload
  3.    window.refresh
  4.    page.refresh
Answer: Option B
Question 11. What is the inital step to set up a CSS Lazy Loading?
  1.    Fetching data
  2.    Loading the script
  3.    Loading the page
  4.    Adding the event listener
Answer: Option A
Question 12. What is the purpose of holding whatever tag you create in the attribute type?
  1.    To have more information
  2.    To identify the scripting language
  3.    All of the mentioned
  4.    None of the mentioned
Answer: Option B
Question 13. What should be the value of the type attribute of a variable if the type of file is CSS?
  1.    text/js/css
  2.    text/js
  3.    text/css
  4.    text
Answer: Option C
Question 14. What does the appendChild() method perform?
  1.    Appends a node in the middle of the index taken as the parameter
  2.    Appends a node as the first child
  3.    Appends a node as the last child
  4.    None of the mentioned
Answer: Option C
Question 15. How to lazy load images?
  1.    Remove the rel attribute
  2.    Remove the src attribute
  3.    Make rel = src
  4.    Make src = rel
Answer: Option B
Question 16. What does the rel attribute of a variable have when the type of file is CSS?
  1.    css
  2.    stylesheet
  3.    text/css
  4.    all of the mentioned
Answer: Option B
Question 17. How do we stop blocking of loading and executing the perfLogger, a logging type data?
  1.    Inlining the perfLogger
  2.    Removing the perfLogger
  3.    Placing the perfLogger before the “script” tag
  4.    None of the mentione
Answer: Option A
Question 18. What is the parameter of the method getElementsbyTagName() if we need to get an image?
  1.    image
  2.    src
  3.    img
  4.    imageurl
Answer: Option C
Question 19. Which of the following property gives access to the JavaScript memory usage data?
  1.    performance.memory
  2.    memory(performance)
  3.    performance(memory)
  4.    none of the mentioned
Answer: Option A
Question 20. What is the purpose of the timing property in the window.performance object?
  1.    Time of navigation event
  2.    Time of page load event
  3.    Time of navigation and page load event
  4.    None of the mentioned
Answer: Option C