uiz Space

January 2026 term · Modern Application Development II · BSCS2006

Modern Application Development II Quiz 1: 15 March 2026 (January 2026 term)

The IIT Madras BS Modern Application Development II (MAD 2) Quiz 1 paper sat on 15 Mar 2026, in the January 2026 term: 17 questions for 51 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
17
Marks
51
Duration
120 min
MSQ
3
MCQ
12
Written
2

Updated

Official paper: Modern Application Development Ii 15 Mar 26 · No negative marking.

Question 1

+2 marksOne or more correct options

Which of the following statements about JavaScript scope is/are correct in the browser?

Select all that apply.

  1. A

    is function-scoped

  2. B

    and are block-scoped

  3. C

    Variables declared with are hoisted and initialized with

  4. D

    variables can be declared without initialization

  5. E

    Global variables are always attached to window (as a property)

Show answer

Correct answers

  • A

    is function-scoped

  • B

    and are block-scoped

Question 2

+2 marksOne or more correct options

Which of the following statements about JavaScript functions is/are true?

Select all that apply.

  1. A

    Every function in JavaScript is an object.

  2. B

    Arrow functions have their own “this” binding

  3. C

    Function declarations are hoisted.

  4. D

    Function expressions assigned to variables are hoisted with their function value.

Show answer

Correct answers

  • A

    Every function in JavaScript is an object.

  • C

    Function declarations are hoisted.

Question 3

+3 marksOne correct option

Consider the following JavaScript code:

What will be printed on the console?

Consider the following JavaScript code:
  1. A

    20

  2. B

    10

  3. C

    undefined

  4. D

    3

Show answer

Correct answer

  • A

    20

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 5

+3 marksOne correct option

Match the following storage mechanisms used in the browser with their correct characteristics.

Which of the following is the correct matching?

Match the following storage mechanisms used in the browser with their correct characteristics.
  1. A

    1 → B, 2 → C, 3 → A

  2. B

    1 → B, 2 → A, 3 → C

  3. C

    1 → A, 2 → C, 3 → B

  4. D

    1 → B, 2 → C, 3 → D

Show answer

Correct answer

  • D

    1 → B, 2 → C, 3 → D

Question 6

+3 marksOne correct option

Consider the following Vue application with markup index.html and javascript file app.js. index.html:

app.js:

What will be rendered by the browser after 4 seconds?

Consider the following Vue application with markup index.html and javascript file app.js.  index.html:
Consider the following Vue application with markup index.html and javascript file app.js.  index.html:
  1. A

    total payable amount is 6000

  2. B

    total payable amount is 8200

  3. C

    total payable amount is 1800

  4. D

    total payable amount is 7800

Show answer

Correct answer

  • B

    total payable amount is 8200

Question 7

+3 marksOne correct option

What will be the output of the following program ?

What will be the output of the following program ?
  1. A

    Undefined

  2. B

    Modern Application Development 2

  3. C

    Will throw syntax error

  4. D

    None of these

Show answer

Correct answer

  • B

    Modern Application Development 2

Question 8

+3 marksWritten answer

Consider the following JavaScript code snippet:

What is the final value of x, logged on the console?

Consider the following JavaScript code snippet:
Show answer

A written answer, not marked automatically.

Question 9

+2 marksOne correct option

Which of the following best describes UI State (Ephemeral State) in frontend applications?

  1. A

    It includes all data stored permanently in the database and is shared across users

  2. B

    It represents the complete system data such as users, products, and transactions

  3. C

    It refers to short-lived interface elements like loading indicators or selected tabs

  4. D

    It handles complex application logic and long-term session management

Show answer

Correct answer

  • C

    It refers to short-lived interface elements like loading indicators or selected tabs

Question 10

+2 marksOne correct option

Given that HTTP is stateless, which approach is commonly used to manage application state between the client and the server?

  1. A

    Storing all state permanently in frontend memory across sessions

  2. B

    Allowing the frontend to handle complex business logic and data storage

  3. C

    Client or server maintaining state and explicitly exchanging it through requests

  4. D

    Eliminating state entirely from web applications

Show answer

Correct answer

  • C

    Client or server maintaining state and explicitly exchanging it through requests

Question 11

+4 marksOne correct option

Consider the below Javascript function:

What will be the output of the above program ?

Consider the below Javascript function:
  1. A

    1 2 1

  2. B

    0 0 0

  3. C

    1 2 3

  4. D

    0 1 0

Show answer

Correct answer

  • D

    0 1 0

Question 12

+5 marksOne correct option

Consider the following Vue app with html and javascript file given below: File: index.html

File: script.js

What will be rendered on the browser for the code setup given above ?

Consider the following Vue app with html and javascript file given below:  File: index.html
Consider the following Vue app with html and javascript file given below:  File: index.html
  1. A
    Figure from the original question paper
  2. B
    Figure from the original question paper
  3. C
    Figure from the original question paper
  4. D

    None of these.

Show answer

Correct answer

  • C
    Figure from the original question paper

Question 13

+5 marksOne correct option

Consider the following JavaScript code:

What would be the end result at the end of execution of the code?

Consider the following JavaScript code:
  1. A

    5

  2. B

    13

  3. C

    8

  4. D

    11

Show answer

Correct answer

  • B

    13

Question 14

+4 marksOne or more correct options

Consider the following JavaScript code:

Which of the following statements are TRUE?

Consider the following JavaScript code:

Select all that apply.

  1. A

    returns "Electronic device"

  2. B

    returns "Samsung is a Electronic device"

  3. C

    Calling throws a runtime error

  4. D

    returns "Electronic device"

Show answer

Correct answers

  • A

    returns "Electronic device"

  • B

    returns "Samsung is a Electronic device"

  • C

    Calling throws a runtime error

Question 15

+3 marksOne correct option

Consider the following HTML and Vue component code carefully and answer the given sub-questions. File: index.html

File: script.js

Consider the following HTML and Vue component code carefully and answer the given sub-questions.  File: index.html
Consider the following HTML and Vue component code carefully and answer the given sub-questions.  File: index.html

When the lifecycle hook is invoked, which of the following statements becomes TRUE?

  1. A

    The element exists in the DOM but still contains {{ message }}

  2. B

    The DOM content already reflects the updated value "Start A"

  3. C

    The hook has already executed

  4. D

    The DOM does not exist at all

Show answer

Correct answer

  • A

    The element exists in the DOM but still contains {{ message }}

Question 16

+3 marksOne correct option

Consider the following HTML and Vue component code carefully and answer the given sub-questions. File: index.html

File: script.js

Consider the following HTML and Vue component code carefully and answer the given sub-questions.  File: index.html
Consider the following HTML and Vue component code carefully and answer the given sub-questions.  File: index.html

What will be the final text content displayed in the browser inside the element after the component is fully mounted and all statements in the hook have executed?

  1. A

    —

  2. B

    —

  3. C

    —

  4. D

    —

Show answer

Correct answer

  • D

    —

Question 17

+1 markWritten answer

Consider the following HTML and Vue component code carefully and answer the given sub-questions. File: index.html

File: script.js

Consider the following HTML and Vue component code carefully and answer the given sub-questions.  File: index.html
Consider the following HTML and Vue component code carefully and answer the given sub-questions.  File: index.html
Show answer

A written answer, not marked automatically.