cs2006_2026T1_Q1_NA.pdf
Application Development - 2(APP DEV-2) · Quiz 1 · Jan 2026
← Course papers · Start practice / exam
Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.
Question 2 MSQ · 2.0 marks
Which of the following statements about JavaScript scope is/are correct in the browser?
[[IMAGE:ffd929473e8b3cca_3_2]] is function-scoped

[[IMAGE:ffd929473e8b3cca_3_3]] and [[IMAGE:ffd929473e8b3cca_3_4]] are block-scoped


Variables declared with [[IMAGE:ffd929473e8b3cca_3_5]] are hoisted and initialized with [[IMAGE:ffd929473e8b3cca_3_6]]


[[IMAGE:ffd929473e8b3cca_3_7]] variables can be declared without initialization

Global variables are always attached to window (as a property)
A published solution is not available for this question yet.
Question 3 MSQ · 2.0 marks
Which of the following statements about JavaScript functions is/are true?
Every function in JavaScript is an object.
Arrow functions have their own **“this”** binding
Function declarations are **hoisted**.
Function expressions assigned to variables are **hoisted** with their function
value.
A published solution is not available for this question yet.
Question 4 MCQ · 3.0 marks
Consider the following JavaScript code:
[[IMAGE:ffd929473e8b3cca_4_8]]
What will be printed on the console?

20
10
undefined
3
A published solution is not available for this question yet.
Question 5 MCQ · 3.0 marks
Consider the following JavaScript code:
[[IMAGE:ffd929473e8b3cca_5_9]]
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?

[[IMAGE:ffd929473e8b3cca_5_10]]

[[IMAGE:ffd929473e8b3cca_5_11]]

[[IMAGE:ffd929473e8b3cca_5_12]]

[[IMAGE:ffd929473e8b3cca_5_13]]

A published solution is not available for this question yet.
Question 6 MCQ · 3.0 marks
Match the following storage mechanisms used in the browser with their correct characteristics.
[[IMAGE:ffd929473e8b3cca_5_14]]
Which of the following is the correct matching?

1 → B, 2 → C, 3 → A
1 → B, 2 → A, 3 → C
1 → A, 2 → C, 3 → B
1 → B, 2 → C, 3 → D
A published solution is not available for this question yet.
Question 7 MCQ · 3.0 marks
Consider the following Vue application with markup index.html and javascript file app.js.
index.html:
[[IMAGE:ffd929473e8b3cca_6_15]]
app.js:
[[IMAGE:ffd929473e8b3cca_7_16]]
What will be rendered by the browser **after 4 seconds**?


total payable amount is 6000
total payable amount is 8200
total payable amount is 1800
total payable amount is 7800
A published solution is not available for this question yet.
Question 8 MCQ · 3.0 marks
What will be the output of the following program ?
[[IMAGE:ffd929473e8b3cca_8_17]]

Undefined
Modern Application Development 2
Will throw syntax error
None of these
A published solution is not available for this question yet.
Question 9 NAT · 3.0 marks
Consider the following JavaScript code snippet:
[[IMAGE:ffd929473e8b3cca_8_18]]
What is the final value of **x**, logged on the console?

A published solution is not available for this question yet.
Question 10 MCQ · 2.0 marks
Which of the following best describes **UI State (Ephemeral State)** in frontend applications?
It includes all data stored permanently in the database and is shared across
users
It represents the complete system data such as users, products, and
transactions
It refers to short-lived interface elements like loading indicators or selected
tabs
It handles complex application logic and long-term session management
A published solution is not available for this question yet.
Question 11 MCQ · 2.0 marks
Given that HTTP is stateless, which approach is commonly used to manage application state
between the client and the server?
Storing all state permanently in frontend memory across sessions
Allowing the frontend to handle complex business logic and data storage
Client or server maintaining state and explicitly exchanging it through
requests
Eliminating state entirely from web applications
A published solution is not available for this question yet.
Question 12 MCQ · 4.0 marks
Consider the below Javascript function:
[[IMAGE:ffd929473e8b3cca_10_19]]
What will be the output of the above program ?

1
2
1
0
0
0
1
2
3
0
1
0
A published solution is not available for this question yet.
Question 13 MCQ · 5.0 marks
Consider the following Vue app with html and javascript file given below:
File: index.html
[[IMAGE:ffd929473e8b3cca_11_20]]
File: script.js
[[IMAGE:ffd929473e8b3cca_11_21]]
What will be rendered on the browser for the code setup given above ?


[[IMAGE:ffd929473e8b3cca_11_22]]

[[IMAGE:ffd929473e8b3cca_12_23]]

[[IMAGE:ffd929473e8b3cca_12_24]]

None of these.
A published solution is not available for this question yet.
Question 14 MCQ · 5.0 marks
Consider the following JavaScript code:
[[IMAGE:ffd929473e8b3cca_13_25]]
What would be the end result at the end of execution of the code?

5
13
8
11
A published solution is not available for this question yet.
Question 15 MSQ · 4.0 marks
Consider the following JavaScript code:
[[IMAGE:ffd929473e8b3cca_14_26]]
Which of the following statements are TRUE?

[[IMAGE:ffd929473e8b3cca_14_27]] returns **"Electronic device"**

[[IMAGE:ffd929473e8b3cca_14_28]] returns **"Samsung is a Electronic device"**

Calling [[IMAGE:ffd929473e8b3cca_14_29]] throws a runtime error

[[IMAGE:ffd929473e8b3cca_14_30]] returns **"Electronic device"**

A published solution is not available for this question yet.
Question 16 MCQ · 3.0 marks
Consider the following HTML and Vue component code carefully and answer the given sub-
questions.
File: index.html
[[IMAGE:ffd929473e8b3cca_15_31]]
File: script.js
[[IMAGE:ffd929473e8b3cca_15_32]]
When the [[IMAGE:ffd929473e8b3cca_15_33]] lifecycle hook is invoked, which of the following statements becomes
TRUE?



The [[IMAGE:ffd929473e8b3cca_15_34]] element exists in the DOM but still contains {{ message
}}

The **DOM** content already reflects the updated value **"Start A"**
The [[IMAGE:ffd929473e8b3cca_15_35]] hook has already executed

The **DOM** does not exist at all
A published solution is not available for this question yet.
Question 17 MCQ · 3.0 marks
Consider the following HTML and Vue component code carefully and answer the given sub-
questions.
File: index.html
[[IMAGE:ffd929473e8b3cca_15_31]]
File: script.js
[[IMAGE:ffd929473e8b3cca_15_32]]
What will be the **final text content displayed in the browser inside the** [[IMAGE:ffd929473e8b3cca_16_36]] **element** after the
component is fully mounted and all statements in the [[IMAGE:ffd929473e8b3cca_16_37]] hook have executed?




[[IMAGE:ffd929473e8b3cca_16_38]]

[[IMAGE:ffd929473e8b3cca_16_39]]

[[IMAGE:ffd929473e8b3cca_16_40]]

[[IMAGE:ffd929473e8b3cca_16_41]]

A published solution is not available for this question yet.