Quiz Space

Modern Application Development II · Quiz 1 · 15 Mar 2026 · January 2026 term

Question 4: Consider the following JavaScript code: The above code is…

Question 4

+3 marksOne correct option

Consider the following JavaScript code:

The above code is initially loaded in the browser, and then the browser is refreshed two times. What will be the final output printed in the console?

Consider the following JavaScript code:
  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answer

  • B

    —

Question 4 of 17 in the IIT Madras BS Modern Application Development II (MAD 2) Quiz 1 paper sat on 15 Mar 2026, in the January 2026 term (Modern Application Development Ii 15 Mar 26). It carries 3 marks.

More questions from this paper

  1. Q1Which of the following statements about JavaScript scope is/are correct in the browser?
  2. Q2Which of the following statements about JavaScript functions is/are true?
  3. Q3Consider the following JavaScript code: What will be printed on the console?
  4. Q5Match the following storage mechanisms used in the browser with their correct characteristics. Which of the following i…
  5. Q6Consider the following Vue application with markup index.html and javascript file app.js. index.html: app.js: What will…
  6. Q7What will be the output of the following program ?
  7. Q8Consider the following JavaScript code snippet: What is the final value of x, logged on the console?
  8. Q9Which of the following best describes UI State (Ephemeral State) in frontend applications?
  9. Q10Given that HTTP is stateless, which approach is commonly used to manage application state between the client and the se…
  10. Q11Consider the below Javascript function: What will be the output of the above program ?
  11. Q12Consider the following Vue app with html and javascript file given below: File: index.html File: script.js What will be…
  12. Q13Consider the following JavaScript code: What would be the end result at the end of execution of the code?
  13. Q14Consider the following JavaScript code: Which of the following statements are TRUE?
  14. Q15File: script.js When the lifecycle hook is invoked, which of the following statements becomes TRUE?
  15. Q16File: script.js What will be the final text content displayed in the browser inside the element after the component is …
  16. Q17File: script.js