Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT"DIPLOMA LEVEL : MODERN APPLICATION
DEVELOPMENT II (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
DEVELOPMENT II (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
You are building a login feature for a web application. The frontend sends theuser’s emailand passwordto the backend API. The backend validates credentials against a database. Which security issues exist in the code given below?
Frontend: script.js

Backend: app.py

Frontend: script.js
Backend: app.py
Solution
Consider the following Vue.js code.

What will be printed on the console first?
What will be printed on the console first?
Solution
Consider the following Vue.js application with two different route scenarios and a component that uses reactive data binding:
Scenario: An e-commerce application where:
- Product list component displays products filtered by category
- Category changes through router parameters:/products/:category
- When a user navigates from/products/electronicsto/products/books, the product list should update
Component Code:

If the developer changed the template to usedisplayedProductsinstead offilteredProducts, What would be the most likely issue?
Scenario: An e-commerce application where:
- Product list component displays products filtered by category
- Category changes through router parameters:/products/:category
- When a user navigates from/products/electronicsto/products/books, the product list should update
Component Code:
If the developer changed the template to usedisplayedProductsinstead offilteredProducts, What would be the most likely issue?
Solution
Consider the following JavaScript code:

What will be printed to the console?
What will be printed to the console?
Solution
Match the following web dev concept given below:

Which of the following options correctly matches Concept / Issue and Description?
Which of the following options correctly matches Concept / Issue and Description?
Solution
Consider the following Vuex store setup for a user management system:

Suppose the followingmutation is committed:store.commit("updateUserStatus", { userId: 2, status: "active" });.
Which of the following statements is TRUE after this mutation is executed?
Suppose the followingmutation is committed:store.commit("updateUserStatus", { userId: 2, status: "active" });.
Which of the following statements is TRUE after this mutation is executed?
Solution
In Vue 2 (CDN), which of the following correctly describes the timing of thebeforeDestroyand destroyedlifecycle hooks?
Solution
Consider the following HTML:

And JavaScript code:

What are the values of id and action respectively?
And JavaScript code:
What are the values of id and action respectively?
Solution
Which of the following statements best describes apermalink?
Solution
Consider the following code snippet running in a browser.

What will be the output on the console?
What will be the output on the console?
Solution
Consider the following code snippet running on a browser. What is the output on the console?

Solution
Consider the following markup index.html and JavaScript app.js for a Vue application.
app.js:

index.html:

Suppose the application is running on http://localhost:8080, and the user visit the URL “http://localhost:8080/#/player/rohit/t20”. What will be rendered by the browser?
app.js:
index.html:
Suppose the application is running on http://localhost:8080, and the user visit the URL “http://localhost:8080/#/player/rohit/t20”. What will be rendered by the browser?
Solution
Consider the following html index.html and JavaScript app.js for a Vue application:
File : index.html

File : app.js

Suppose the application is running on http://localhost:8080, and the user visits the URL http://localhost:8080/#/b. What will be rendered by the browser?
File : index.html
File : app.js
Suppose the application is running on http://localhost:8080, and the user visits the URL http://localhost:8080/#/b. What will be rendered by the browser?
Solution
Consider a scenario involving localStorage, Promise chains, and Vue lifecycle hooks:
Scenario: A user authentication system where:
- On app initialization, the app checks localStorage for a stored user token
- If a token exists, it validates the token asynchronously (via a Promise)
- Based on validation, different UI components are rendered
- The user navigates between different views
Code in mounted() hook:

Which of the following statements is/are CORRECT about this implementation?
Scenario: A user authentication system where:
- On app initialization, the app checks localStorage for a stored user token
- If a token exists, it validates the token asynchronously (via a Promise)
- Based on validation, different UI components are rendered
- The user navigates between different views
Code in mounted() hook:
Which of the following statements is/are CORRECT about this implementation?
Solution
Consider the following Vue application:
File: Index.html

File: app.js

The application consists of aparent componentand achild component. When the button inside the child component is clicked, the parent’s message should update and display"Hello"in the browser. Two important lines are missing and marked as(Code1)and(Code2).
Which of the following options correctly completes the code?
File: Index.html
File: app.js
The application consists of aparent componentand achild component. When the button inside the child component is clicked, the parent’s message should update and display"Hello"in the browser. Two important lines are missing and marked as(Code1)and(Code2).
Which of the following options correctly completes the code?
Solution
Consider the following HTML index.html and JavaScript app.js for a Vue application:
File: index.html

File: app.js

Which of the following statements is/are TRUE?
File: index.html
File: app.js
Which of the following statements is/are TRUE?
Solution
Shape
Thickness [ / ]
3
All colors