cs2006_2026T2_Q1_NA.pdf
Application Development - 2(APP DEV-2) · Quiz 1 · May 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
Consider running the following in Browser console:
[[IMAGE:d73e6910685f9497_2_2]]
Which of the following statements are correct?

The first line prints [[IMAGE:d73e6910685f9497_2_3]] .

The second line prints [[IMAGE:d73e6910685f9497_2_4]] .

[[IMAGE:d73e6910685f9497_2_5]] will work in Browser by default because V8
provides the DOM.

Different runtimes (browser, Node.js, etc.) can provide different APIs even if
they use the same JavaScript engine.
A published solution is not available for this question yet.
Question 3 MSQ · 2.0 marks
Which of the following are advantages of component-based frontend frameworks like Vue.js?
Code reusability
Better maintainability
Automatic SQL query optimization
Easier UI management
A published solution is not available for this question yet.
Question 4 MSQ · 2.0 marks
Which of the following cases is a function being used as a **callback**?
[[IMAGE:d73e6910685f9497_3_6]]

[[IMAGE:d73e6910685f9497_3_7]]

[[IMAGE:d73e6910685f9497_3_8]]

[[IMAGE:d73e6910685f9497_3_9]]

A published solution is not available for this question yet.
Question 5 MCQ · 3.0 marks
What is the correct output order for the following code?
[[IMAGE:d73e6910685f9497_3_10]]

1 2 3 4
1 4 2 3
2 1 4 3
4 1 2 3
A published solution is not available for this question yet.
Question 6 MCQ · 3.0 marks
A child component is initially visible using [[IMAGE:d73e6910685f9497_4_11]] . The parent first updates a prop passed
to the child, and then sets [[IMAGE:d73e6910685f9497_4_12]] . After the child has already mounted once, which
sequence can occur in the child after initial render?


[[IMAGE:d73e6910685f9497_4_13]] -> [[IMAGE:d73e6910685f9497_4_14]] -> [[IMAGE:d73e6910685f9497_4_15]] -> [[IMAGE:d73e6910685f9497_4_16]]




[[IMAGE:d73e6910685f9497_4_17]] -> [[IMAGE:d73e6910685f9497_4_18]] -> [[IMAGE:d73e6910685f9497_4_19]] -> [[IMAGE:d73e6910685f9497_4_20]]




[[IMAGE:d73e6910685f9497_4_21]] -> [[IMAGE:d73e6910685f9497_4_22]] -> [[IMAGE:d73e6910685f9497_4_23]] -> [[IMAGE:d73e6910685f9497_4_24]]




[[IMAGE:d73e6910685f9497_4_25]] -> [[IMAGE:d73e6910685f9497_4_26]] -> [[IMAGE:d73e6910685f9497_4_27]] -> [[IMAGE:d73e6910685f9497_4_28]]




A published solution is not available for this question yet.
Question 7 MCQ · 3.0 marks
Consider the following JavaScript code snippet.
[[IMAGE:d73e6910685f9497_5_29]]
What will be the output of the above code on the browsers’ console?

50
50
60
40
50
50
60
60
50
30
60
60
50
30
60
40
A published solution is not available for this question yet.
Question 8 MCQ · 3.0 marks
Consider the following JavaScript code snippet.
[[IMAGE:d73e6910685f9497_6_30]]
What will be the output of the above code on the browsers’ console?

The European countries are Spain and Germany.
The final numerical value is: 115.
The European countries are Italy and England.
The final numerical value is: 65.
The European countries are Spain and Germany.
The final numerical value is: 65.
The European countries are Italy and England.
The final numerical value is: 115.
A published solution is not available for this question yet.
Question 9 MCQ · 3.0 marks
Consider the following JavaScript code snippet.
[[IMAGE:d73e6910685f9497_7_31]]
What will be the output of the above code on the browsers’ console?

The selected elements are: Gold and Argon
The selected elements are: Aluminium and Silver
The selected elements are: Argon and Neon
The selected elements are: Gold and Neon
The selected elements are: Argon and Gold
A published solution is not available for this question yet.
Question 10 MCQ · 2.0 marks
Which of the following Vue directives are correctly matched with their purpose?
v-show → fetching api
v-for → Iteration over lists
v-bind → Conditional rendering
v-model → Event handling only
A published solution is not available for this question yet.
Question 11 MSQ · 3.0 marks
Given the following parent-child setup in Vue 2:
[[IMAGE:d73e6910685f9497_8_32]]
and inside the child:
[[IMAGE:d73e6910685f9497_8_33]]
Which statements are correct?


[[IMAGE:d73e6910685f9497_8_34]] flows from parent to child through props.

[[IMAGE:d73e6910685f9497_8_35]] is a custom event sent from child to parent.

The child should directly change [[IMAGE:d73e6910685f9497_8_36]] to update the parent source of
truth.

If [[IMAGE:d73e6910685f9497_8_37]] changes in the parent, the child can receive the updated prop
value.

A published solution is not available for this question yet.
Question 12 MSQ · 3.0 marks
Identify the issue in the following Vue.js code:
[[IMAGE:d73e6910685f9497_9_38]]
Why does the [[IMAGE:d73e6910685f9497_9_39]] value not update correctly when the button is clicked?


[[IMAGE:d73e6910685f9497_9_40]] should be used instead of [[IMAGE:d73e6910685f9497_9_41]]


Arrow functions do not bind their own [[IMAGE:d73e6910685f9497_9_42]]

[[IMAGE:d73e6910685f9497_9_43]] should be a function in all Vue instances

Vue.js does not support external methods
A published solution is not available for this question yet.
Question 13 MSQ · 3.0 marks
Consider the following JavaScript code snippet.
[[IMAGE:d73e6910685f9497_10_44]]
Which of the following statements is/are correct?

[[IMAGE:d73e6910685f9497_10_45]] will work correctly and return 8

[[IMAGE:d73e6910685f9497_10_46]] will work correctly and return 8

[[IMAGE:d73e6910685f9497_10_47]] will work correctly and return 15

[[IMAGE:d73e6910685f9497_10_48]] will work correctly and return 15

A published solution is not available for this question yet.
Question 14 MCQ · 4.5 marks
Consider the following JavaScript code snippet.
[[IMAGE:d73e6910685f9497_11_49]]
What will be the output of the above code on the browsers’ console?

You are accessing: 45
You are accessing: 55
You are accessing: 25
You are accessing: 35
You are accessing: 25
You are accessing: 55
You are accessing: 45
You are accessing: 35
A published solution is not available for this question yet.
Question 15 MCQ · 4.5 marks
Consider the following JavaScript code snippet.
[[IMAGE:d73e6910685f9497_12_50]]
What will be the output of the above code on the browsers’ console in correct order?

undefined
alpha
beta
delta
Reference Error
zeta
undefined
beta
delta
Reference Error
undefined
Reference Error
beta
charlie
undefined
zeta
Reference Error
beta
charlie
undefined
A published solution is not available for this question yet.
Question 16 MCQ · 4.5 marks
Consider the following JavaScript code snippet.
[[IMAGE:d73e6910685f9497_13_51]]
What will be the output of the above code on the browsers’ console?

['gust', 'rch', 'ril']
['rch', 'ril', 'gust']
ril
rch
A published solution is not available for this question yet.
Question 17 MCQ · 4.5 marks
Consider the following JavaScript code snippet.
[[IMAGE:d73e6910685f9497_14_52]]
What will be the output of the above code on the browsers’ console?

Program start
First start
First timeout
First end
Second start
Second timeout
Program end
Program start
First start
First end
First timeout
Second start
Second timeout
Program end
Program start
First timeout
First start
First end
Second timeout
Second start
Program end
Program start
First start
First end
Second start
Program end
First timeout
Second timeout
A published solution is not available for this question yet.